From 45d195bcd237c6e6f89274334b152acd2da743c8 Mon Sep 17 00:00:00 2001 From: alfrix Date: Fri, 11 Feb 2022 09:36:42 -0300 Subject: [PATCH] base_panel: Increase horizontal margin The sidebar was too close to the content, this was better shown by adding a border to the sidebar wich showed that the content was clipping over it --- panels/base_panel.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panels/base_panel.py b/panels/base_panel.py index 66d05c8c..f2567a7d 100644 --- a/panels/base_panel.py +++ b/panels/base_panel.py @@ -88,8 +88,10 @@ class BasePanel(ScreenPanel): self.titlelbl.set_valign(Gtk.Align.CENTER) self.set_title(title) + self.hmargin = 5 self.content = Gtk.VBox(spacing=0) - self.content.set_size_request(self._screen.width - action_bar_width, self._screen.height - self.title_spacing) + self.content.set_size_request(self._screen.width - action_bar_width - self.hmargin, + self._screen.height - self.title_spacing) if action_bar is True: self.layout.put(self.control_grid, 0, 0) @@ -110,7 +112,7 @@ class BasePanel(ScreenPanel): self.layout.put(self.control['temp_box'], action_bar_width, 0) self.layout.put(self.titlelbl, action_bar_width, 0) self.layout.put(self.control['time_box'], action_bar_width, 0) - self.layout.put(self.content, action_bar_width, self.title_spacing) + self.layout.put(self.content, action_bar_width + self.hmargin, self.title_spacing) def initialize(self, panel_name): # Create gtk items here @@ -147,7 +149,7 @@ class BasePanel(ScreenPanel): size = self.control['time_box'].get_allocation().width self.layout.remove(self.control['time_box']) self.control['time_box'].set_size_request(size, self.title_spacing) - self.layout.put(self.control['time_box'], self._screen.width - size - 5, 0) + self.layout.put(self.control['time_box'], self._screen.width - size - self.hmargin, 0) GLib.timeout_add_seconds(1, self.update_time) self.update_time()