[polari] fixedSizeFrame: Don't inherit from Gtk.Frame



commit 54229f7da15b65f43682d0f529886b01c20b3737
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Oct 9 04:54:42 2020 +0200

    fixedSizeFrame: Don't inherit from Gtk.Frame
    
    We don't actually use any frame features, so pick a more generic
    parent class that will be easier to port to GTK4.
    
    https://gitlab.gnome.org/GNOME/polari/-/merge_requests/174

 data/resources/main-window.ui | 1 -
 src/mainWindow.js             | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index d3d50bf6..abcd240e 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -251,7 +251,6 @@
                 <property name="visible">True</property>
                 <property name="hexpand">False</property>
                 <property name="width">200</property>
-                <property name="shadow-type">none</property>
                 <style>
                   <class name="polari-room-list"/>
                 </style>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index a7fe0072..735c84e4 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -22,7 +22,7 @@ var FixedSizeFrame = GObject.registerClass({
             GObject.ParamFlags.READWRITE,
             -1, GLib.MAXINT32, -1),
     },
-}, class FixedSizeFrame extends Gtk.Frame {
+}, class FixedSizeFrame extends Gtk.Bin {
     _init(params) {
         this._height = -1;
         this._width = -1;
@@ -32,8 +32,7 @@ var FixedSizeFrame = GObject.registerClass({
 
     _queueRedraw() {
         let child = this.get_child();
-        if (child)
-            child.queue_resize();
+        child?.queue_resize();
         this.queue_draw();
     }
 


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