forked from CreatBot/CreatBotKlipperScreen
gtk: resizability
doesn't rescale the fonts or images
This commit is contained in:
@@ -59,9 +59,8 @@ class BasePanel(ScreenPanel):
|
||||
else:
|
||||
self.action_bar.set_hexpand(False)
|
||||
self.action_bar.set_vexpand(True)
|
||||
self.action_bar.set_size_request(self._gtk.get_action_bar_width(), self._gtk.get_action_bar_height())
|
||||
|
||||
self.action_bar.get_style_context().add_class('action_bar')
|
||||
self.action_bar.set_size_request(self._gtk.action_bar_width, self._gtk.action_bar_height)
|
||||
self.action_bar.add(self.control['back'])
|
||||
self.action_bar.add(self.control['home'])
|
||||
self.show_back(False)
|
||||
@@ -88,7 +87,7 @@ class BasePanel(ScreenPanel):
|
||||
self.control['time_box'].pack_end(self.control['time'], True, True, 10)
|
||||
|
||||
self.titlebar = Gtk.Box(spacing=5)
|
||||
self.titlebar.set_size_request(self._gtk.get_content_width(), self._gtk.get_titlebar_height())
|
||||
self.titlebar.get_style_context().add_class("title_bar")
|
||||
self.titlebar.set_valign(Gtk.Align.CENTER)
|
||||
self.titlebar.add(self.control['temp_box'])
|
||||
self.titlebar.add(self.titlelbl)
|
||||
@@ -96,9 +95,6 @@ class BasePanel(ScreenPanel):
|
||||
|
||||
# Main layout
|
||||
self.main_grid = Gtk.Grid()
|
||||
# To achieve rezisability this needs to be removed
|
||||
# The main issue is that currently the content doesn't expand correctly
|
||||
self.main_grid.set_size_request(self._screen.width, self._screen.height)
|
||||
|
||||
if self._screen.vertical_mode:
|
||||
self.main_grid.attach(self.titlebar, 0, 0, 1, 1)
|
||||
@@ -111,8 +107,6 @@ class BasePanel(ScreenPanel):
|
||||
self.main_grid.attach(self.titlebar, 1, 0, 1, 1)
|
||||
self.main_grid.attach(self.content, 1, 1, 1, 1)
|
||||
|
||||
# Layout is and content are on screen_panel
|
||||
self.layout.add(self.main_grid)
|
||||
self.update_time()
|
||||
|
||||
def show_heaters(self, show=True):
|
||||
|
Reference in New Issue
Block a user