[gnome-tweak-tool] main_content: Set margin deeper in the widget tree
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] main_content: Set margin deeper in the widget tree
- Date: Thu, 10 Aug 2017 23:04:48 +0000 (UTC)
commit ab83958aff4487de7cf8505d168ccf3825c6a2c8
Author: António Fernandes <AntonioJPFernandes gmail com>
Date: Thu Aug 10 20:04:07 2017 +0100
main_content: Set margin deeper in the widget tree
A 20px is set on the whole stack widget, which is parent of the
scrolled window. As a result, the scrollbar is showing inside of
the margin, rather than at the edge of the window, as would be
visually correct.
To fix this, we will set the margin on the listbox inside the
scrolled window instead.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=786069
gtweak/tweakview.py | 2 --
gtweak/widgets.py | 1 +
2 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py
index dc9ab3f..38e6bac 100644
--- a/gtweak/tweakview.py
+++ b/gtweak/tweakview.py
@@ -143,10 +143,8 @@ class Window(Gtk.ApplicationWindow):
def main_content(self):
right_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
- #GRR why can I not put margin in the CSS of a GtkStack
self.stack = Gtk.Stack()
self.stack.get_style_context().add_class("main-container")
- self.stack.props.margin = 20
right_box.pack_start(self.stack, True, True, 0)
diff --git a/gtweak/widgets.py b/gtweak/widgets.py
index aa3f24f..23d31b3 100644
--- a/gtweak/widgets.py
+++ b/gtweak/widgets.py
@@ -217,6 +217,7 @@ class ListBoxTweakGroup(Gtk.ListBox, TweakGroup):
name=options['uid'])
self.get_style_context().add_class(
options.get('css_class','tweak-group'))
+ self.props.margin = 20
self.props.vexpand = False
self.props.valign = Gtk.Align.START
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]