Adjust titlebar height (#248)

This commit is contained in:
Alfredo Monclus 2021-08-30 20:53:23 -03:00 committed by GitHub
parent 11445db55a
commit c54282962d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,6 @@ from ks_includes.KlippyGtk import KlippyGtk
from ks_includes.KlippyGcodes import KlippyGcodes
class ScreenPanel:
title_spacing = 50
def __init__(self, screen, title, back=True, action_bar=True, printer_name=True):
self._screen = screen

View File

@ -16,6 +16,7 @@ class BasePanel(ScreenPanel):
self.current_panel = None
self.time_min = -1
self.time_format = self._config.get_main_config_option("24htime")
self.title_spacing = self._screen.font_size * 2
self.buttons_showing = {
'back': False if back else True

View File

@ -427,7 +427,8 @@ class KlipperScreen(Gtk.Window):
css = open(klipperscreendir + "/styles/%s/style.css" % (self.theme))
css_data = css.read()
css.close()
css_data = css_data.replace("KS_FONT_SIZE",str(self.gtk.get_font_size()))
self.font_size = self.gtk.get_font_size()
css_data = css_data.replace("KS_FONT_SIZE",str(self.font_size))
style_provider = Gtk.CssProvider()
style_provider.load_from_data(css_data.encode())