From 6a32b5affc28cb77bef14550205e46924543677c Mon Sep 17 00:00:00 2001 From: Jonathan Harris <jonathan@marginal.org.uk> Date: Wed, 26 Aug 2015 16:36:14 +0100 Subject: [PATCH] Improve text appearance on OSX 10.11. --- EDMarketConnector.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 6ef6190b..37e34ea5 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -12,6 +12,7 @@ from time import time, localtime, strftime import Tkinter as tk import ttk +import tkFont if __debug__: from traceback import print_exc @@ -50,6 +51,16 @@ class AppWindow: self.w.tk.call('wm', 'iconphoto', self.w, '-default', icon) style = ttk.Style() style.theme_use('clam') + elif platform=='darwin': + # Default ttk font choice looks bad on El Capitan + font = tkFont.Font(family='TkDefaultFont', size=13, weight=tkFont.NORMAL) + style = ttk.Style() + style.configure('TLabel', font=font) + style.configure('TButton', font=font) + style.configure('TLabelframe.Label', font=font) + style.configure('TCheckbutton', font=font) + style.configure('TRadiobutton', font=font) + style.configure('TEntry', font=font) frame = ttk.Frame(self.w) frame.grid(sticky=tk.NSEW)