[gnome-tweaks/ewlsh/fix-window-sizing: 4/4] Fix default window sizing and requests.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks/ewlsh/fix-window-sizing: 4/4] Fix default window sizing and requests.
- Date: Sat, 24 Oct 2020 00:59:04 +0000 (UTC)
commit db7b27963a393a62aa904caa809c390f593d5e35
Author: Evan Welsh <contact evanwelsh com>
Date: Fri Oct 23 18:17:23 2020 -0500
Fix default window sizing and requests.
For main content we can lower our minimum to 540 to accommodate
smaller screens, for the sidebar we should request on the box itself,
and for the window we should call default_size in addition to a
smaller default.
Fixes #253, #245
gtweak/tweakview.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py
index c2843998..94b89a60 100644
--- a/gtweak/tweakview.py
+++ b/gtweak/tweakview.py
@@ -16,7 +16,8 @@ class Window(Gtk.ApplicationWindow):
Gtk.ApplicationWindow.__init__(self,
application=app,
show_menubar=False)
- self.set_size_request(-1, 700)
+ self.set_default_size(980, 640)
+ self.set_size_request(-1, 300)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_name("org.gnome.tweaks")
@@ -137,6 +138,7 @@ class Window(Gtk.ApplicationWindow):
def sidebar(self):
left_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
+ left_box.set_size_request(200, -1)
self.entry = Gtk.SearchEntry(placeholder_text=_("Search Tweaks…"))
if (Gtk.check_version(3, 22, 20) is None):
@@ -149,7 +151,6 @@ class Window(Gtk.ApplicationWindow):
self.listbox = Gtk.ListBox()
self.listbox.get_style_context().add_class("tweak-categories")
- self.listbox.set_size_request(200, -1)
self.listbox.connect("row-selected", self._on_select_row)
self.listbox.set_header_func(self._list_header_func, None)
scroll = Gtk.ScrolledWindow()
@@ -166,7 +167,7 @@ class Window(Gtk.ApplicationWindow):
def main_content(self):
right_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
- right_box.set_size_request(750, -1)
+ right_box.set_size_request(540, -1)
self.stack = Gtk.Stack()
self.stack.get_style_context().add_class("main-container")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]