Commit ab83958a authored by António Fernandes's avatar António Fernandes 🐚 Committed by Jeremy Bicha

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
parent 2641ce6a
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment