[gnome-maps] properties: clear bg of revealer button's actor



commit 202bf7407f59608f1c0e36e9823a914b25e6bb4d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Apr 5 12:25:41 2013 -0400

    properties: clear bg of revealer button's actor
    
    Or its gray background will show through the rounded corners of the
    button.

 src/properties.js |    2 +-
 src/utils.js      |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/properties.js b/src/properties.js
index d43e8f7..3e08ba7 100644
--- a/src/properties.js
+++ b/src/properties.js
@@ -92,7 +92,7 @@ const Properties = new Lang.Class({
         // now create actors
         let buttonActor = new GtkClutter.Actor({ contents: revealButton,
                                                  x_align: Clutter.ActorAlign.END });
-
+        Utils.clearGtkClutterActorBg(buttonActor);
         this.actor.add_child(buttonActor);
 
         let revealerActor = new GtkClutter.Actor({ contents: revealer,
diff --git a/src/utils.js b/src/utils.js
index 42d7888..9bf2b15 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -48,6 +48,14 @@ function addJSSignalMethods(proto) {
     proto.disconnectAllJS = Signals._disconnectAll;
 }
 
+function clearGtkClutterActorBg(actor) {
+    let widget = actor.get_widget();
+    widget.override_background_color(0, new Gdk.RGBA({ red: 0,
+                                                       green: 0,
+                                                       blue: 0,
+                                                       alpha: 0 }));
+}
+
 function initActions(actionMap, simpleActionEntries) {
     simpleActionEntries.forEach(function(entry) {
         let action = new Gio.SimpleAction({ name: entry.name });


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