[gnome-shell-extensions/wip/fmuellner/gtk4: 55/55] auto-move-windows: Use Gtk.Button.icon_name property




commit 689b94611ea6390fcbc7035d1bc0ae2631a45192
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Apr 15 23:32:20 2020 +0200

    auto-move-windows: Use Gtk.Button.icon_name property
    
    Image buttons are a very common pattern, so GTK4 added some
    convenience API we can use to construct them.

 extensions/auto-move-windows/prefs.js | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/extensions/auto-move-windows/prefs.js b/extensions/auto-move-windows/prefs.js
index 3b7e133..c550458 100644
--- a/extensions/auto-move-windows/prefs.js
+++ b/extensions/auto-move-windows/prefs.js
@@ -206,10 +206,7 @@ const RuleRow = GObject.registerClass({
         const button = new Gtk.Button({
             action_name: 'rules.remove',
             action_target: new GLib.Variant('s', this.id),
-            child: new Gtk.Image({
-                icon_name: 'edit-delete-symbolic',
-                pixel_size: 16,
-            }),
+            icon_name: 'edit-delete-symbolic',
         });
         box.append(button);
 


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