Skip to content

Commit

Permalink
Further adjustment of the font for labelframe labels
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanDunfield committed Dec 25, 2024
1 parent 0ec707e commit ad828f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion python/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ def update_current_tab(self, event=None):
self.update_menus(self.menubar)
self.link_tab.draw()
elif tab_name == 'Inside View':
print('Inside View selected.')
self.inside_view.widget.focus_set()
elif tab_name == 'Symmetry':
self.update_menus(self.menubar)
Expand Down
10 changes: 5 additions & 5 deletions python/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ def __init__(self):
# The windowBG, groupBG and subgroupBG colors can be used to match Tk objects to
# Ttk containers.
if sys.platform == 'darwin':
labelframe_font = Tk_.font.Font(name="TkSmallCaptionFont",
exists=True)
labelframe_font.configure(size=14)
self.ttk_style.configure('TLabelframe.Label',
font=labelframe_font)
try:
# check if our Tk supports the new semantic colors
test = Tk_._default_root.winfo_rgb('systemWindowBackgroundColor1')
Expand All @@ -46,7 +41,12 @@ def __init__(self):
else:
self.windowBG = ttk_style.lookup('TLabelframe', 'background')
self.groupBG = self.subgroupBG = self.windowBG

self.font = ttk_style.lookup('TLabel', 'font')
# TLabel.font and TLabelframe.Label.font differ in Tk 9.0 (at
# least on macOS). We restore the Tk 8.6 behavior.
self.ttk_style.configure('TLabelframe.Label',
font=self.font)
self.font_info = fi = Font(font=self.font).actual()
fi['size'] = int(str(fi['size']))

Expand Down

0 comments on commit ad828f6

Please sign in to comment.