[gnome-boxes/gnome-3-6] Use the right icon for the fullscreen button



commit e3da0636079e814b9604b7e12975be4cc1be2729
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Oct 26 15:59:56 2012 +0200

    Use the right icon for the fullscreen button
    
    We were always using the go-to-fullscreen icon, but
    we should use the restore-from-fullscreen icon when in fullscreen
    mode already.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686938

 src/display-page.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index f99142c..5063823 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -10,6 +10,13 @@ private class Boxes.DisplayToolbar: Gd.MainToolbar {
         back.clicked.connect ((button) => { App.app.ui_state = UIState.COLLECTION; });
 
         var fullscreen = add_button ("view-fullscreen-symbolic", null, false) as Gtk.Button;
+        App.app.notify["fullscreen"].connect_after ( () => {
+            var image = fullscreen.get_child() as Gtk.Image;
+            if (App.app.fullscreen)
+                image.icon_name = "view-restore-symbolic";
+            else
+                image.icon_name = "view-fullscreen-symbolic";
+        });
         fullscreen.clicked.connect ((button) => { App.app.fullscreen = !App.app.fullscreen; });
 
         var props = add_button ("utilities-system-monitor-symbolic", null, false) as Gtk.Button;



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