Skip to content

Commit

Permalink
textview: Fix setting font size
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeedali committed Apr 25, 2024
1 parent 0a56a92 commit 70e12f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dialect/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _on_translator_loading(self, window, _value):
def _custom_default_font_size_switch(self, row, _value):
"""Called on self.custom_default_font_size::notify::enable-expansion signal"""
enabled = row.get_enable_expansion()
system_font_size = int(Gtk.Settings.get_default().get_property('gtk-font-name').split()[1])
system_font_size = int(Gtk.Settings.get_default().get_property('gtk-font-name').split(", ")[1])

if enabled:
if Settings.get().default_font_size == 0:
Expand Down
2 changes: 1 addition & 1 deletion dialect/widgets/textview.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, **kwargs):
self.add_controller(scroll_ctrlr)

# Custom font
self._font_size = int(Gtk.Settings.get_default().get_property('gtk-font-name').split()[1])
self._font_size = int(Gtk.Settings.get_default().get_property('gtk-font-name').split(", ")[1])
self._font_css_provider = Gtk.CssProvider()

# Add font CSS provider
Expand Down

0 comments on commit 70e12f4

Please sign in to comment.