[polari] userList: Fix ScrolledWindow sizing issue (again)



commit 843d2cb37d76b213417250b8e2e92a1885e71405
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Sep 11 01:05:30 2016 +0200

    userList: Fix ScrolledWindow sizing issue (again)
    
    GTK+ changed its scrolled window behavior once again, and the user
    list is back to minimum size - we'll have to set the newly added
    :propagate-natural-width and -height properties to get back the
    desired behavior.

 configure.ac    |    2 +-
 src/userList.js |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6473c74..ae18214 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@ AX_CHECK_GIRS_GJS([GdkPixbuf], [2.0])
 AX_CHECK_GIR_SYMBOLS_GJS([Gio], [2.0], [Application.send_notification])
 AX_CHECK_GIRS_GJS([GLib], [2.0])
 AX_CHECK_GIRS_GJS([GObject], [2.0])
-AX_CHECK_GIR_SYMBOLS_GJS([Gtk], [3.0], [ScrolledWindow.set_max_content_height])
+AX_CHECK_GIR_SYMBOLS_GJS([Gtk], [3.0], [ScrolledWindow.set_propagate_natural_width])
 AX_CHECK_GIRS_GJS([Pango], [1.0])
 AX_CHECK_GIRS_GJS([PangoCairo], [1.0])
 AX_CHECK_GIRS_GJS([Secret], [1])
diff --git a/src/userList.js b/src/userList.js
index 4850fdb..4019296 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -371,7 +371,9 @@ const UserList = new Lang.Class({
     _init: function(room) {
         this.parent({ hexpand: true,
                       shadow_type: Gtk.ShadowType.ETCHED_IN,
-                      hscrollbar_policy: Gtk.PolicyType.NEVER });
+                      hscrollbar_policy: Gtk.PolicyType.NEVER,
+                      propagate_natural_width: true,
+                      propagate_natural_height: true });
 
         this._list = new Gtk.ListBox({ vexpand: true });
         this.add(this._list);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]