[Pkg-privacy-commits] [onioncircuits] 19/39: Make both panes of the window scrollable

Sascha Steinbiss sascha at steinbiss.name
Sun May 15 16:40:45 UTC 2016


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository onioncircuits.

commit 64d3e7a15619e29d3508c99f740ac6cb8ec802f4
Author: Alan <alan at boum.org>
Date:   Fri Apr 1 22:56:22 2016 +0200

    Make both panes of the window scrollable
    
    This should make the window resizeable to any size.
    
    Will-fix: #11192
---
 onioncircuits | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/onioncircuits b/onioncircuits
index 20f608f..c702e72 100755
--- a/onioncircuits
+++ b/onioncircuits
@@ -87,7 +87,9 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
     def _create_ui(self):
         """Creates the user interface
         """
-        self.set_default_size(600, 400)
+        self.set_default_size(
+                width=min(900, self.get_screen().get_width()),
+                height=min(500, self.get_screen().get_height()))
         self.set_icon_name('onioncircuits')
         self.connect('delete-event', self.delete_event_cb)
 
@@ -98,6 +100,7 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
         self.set_titlebar(headerbar)
 
         grid = Gtk.Grid()
+        grid.set_column_homogeneous(True)
         self.add(grid)
 
         self._infobar = Gtk.InfoBar()
@@ -132,7 +135,7 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
         scrolledwindow_circuits.set_property('halign', Gtk.Align.FILL)
         scrolledwindow_circuits.set_property('valign', Gtk.Align.FILL)
         scrolledwindow_circuits.set_policy(
-                hscrollbar_policy=Gtk.PolicyType.NEVER,
+                hscrollbar_policy=Gtk.PolicyType.AUTOMATIC,
                 vscrollbar_policy=Gtk.PolicyType.AUTOMATIC)
         grid.attach(scrolledwindow_circuits, 0, 1, 1, 1)
 
@@ -141,11 +144,17 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
         self._path.set_selection_mode(Gtk.SelectionMode.NONE)
         self._placeholder = Gtk.Label(_("Click on a path to get details"))
         self._path.set_placeholder(self._placeholder)
-        self._path.set_property('margin', 6)
-        self._path.set_property('expand', True)
-        self._path.set_property('halign', Gtk.Align.FILL)
-        self._path.set_property('valign', Gtk.Align.FILL)
-        grid.attach(self._path, 1, 1, 1, 1)
+
+        scrolledwindow_path = Gtk.ScrolledWindow()
+        scrolledwindow_path.add(self._path)
+        scrolledwindow_path.set_property('margin', 6)
+        scrolledwindow_path.set_property('expand', True)
+        scrolledwindow_path.set_property('halign', Gtk.Align.FILL)
+        scrolledwindow_path.set_property('valign', Gtk.Align.FILL)
+        scrolledwindow_path.set_policy(
+                hscrollbar_policy=Gtk.PolicyType.AUTOMATIC,
+                vscrollbar_policy=Gtk.PolicyType.AUTOMATIC)
+        grid.attach(scrolledwindow_path, 1, 1, 1, 1)
 
         self.show_all()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncircuits.git



More information about the Pkg-privacy-commits mailing list