[gnome-shell] combo-box-menu-item: Propagate style changes to the combo menu



commit d20e646ed6b445642aa47b01c4837ed2046ead36
Author: Florian MÃllner <fmuellner gnome org>
Date:   Wed Oct 26 18:29:59 2011 +0200

    combo-box-menu-item: Propagate style changes to the combo menu
    
    ComboBoxMenuItems use ClutterClones to reconstruct the active item
    in the associated ComboMenu to not impose a particular MenuItem type
    in the menu. However, this results in style changes (for instance
    those triggered by icon-theme or text-scaling-factor changes) of
    the ComboBoxMenuItem not having a visual effect until the ComboBoxMenu
    is shown.
    As a fix, force a style update on the ComboBoxMenu when the item's
    style changes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662799

 js/ui/popupMenu.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index e5e9921..0c04748 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1500,6 +1500,8 @@ PopupComboMenu.prototype = {
         this.actor._delegate = this;
         this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
         this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
+        sourceActor.connect('style-changed',
+                            Lang.bind(this, this._onSourceActorStyleChanged));
         this._activeItemPos = -1;
         global.focus_manager.add_group(this.actor);
     },
@@ -1519,6 +1521,10 @@ PopupComboMenu.prototype = {
         activeItem.actor.grab_key_focus();
     },
 
+    _onSourceActorStyleChanged: function() {
+        _ensureStyle(this.actor);
+    },
+
     open: function() {
         if (this.isOpen)
             return;



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