[gnome-documents] selections: set the 'osd' style class on the GtkClutterOffscreen



commit fbb474b0d170bcf2fd22520151ebff2242733e24
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Nov 1 10:28:41 2011 -0400

    selections: set the 'osd' style class on the GtkClutterOffscreen
    
    And not on the toolbar. This allows for more flexibility, as we can
    remove the GtkClutterOffscreen fully-transparent background hardcoding.

 data/gtk-style.css |   21 +++++++++++----------
 src/selections.js  |    3 ++-
 2 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index cf921d3..39c211f 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -1,8 +1,4 @@
 /* GTK+ custom style here */
-GtkClutterOffscreen {
-    background-color: alpha(#000, 0.00);
-}
-
 #ViewLoadMore {
     border-image-width: 0 2 2 2;
     border-width: 0 1 1 1;
@@ -15,7 +11,12 @@ GtkClutterOffscreen {
     color: #ffffff;
 }
 
-.osd.toolbar {
+.osd {
+    background-image: none;
+    background-color: alpha(#000, 0.00);
+}
+
+.osd .toolbar {
     padding: 6 6;
     border-style: none;
     border-radius: 5;
@@ -29,15 +30,15 @@ GtkClutterOffscreen {
     icon-shadow: 1 1 black;
 }
 
-.osd.toolbar .favorite {
+.osd .toolbar .favorite {
     color: shade(@theme_selected_bg_color, 1.20);
 }
 
-.osd.toolbar .separator {
+.osd .toolbar .separator {
     color: alpha(@theme_tooltip_fg_color, 0.30);
 }
 
-.osd.toolbar .button:hover {
+.osd .toolbar .button:hover {
     background-image: -gtk-gradient(linear, left top, left bottom,
                                     from(alpha(@theme_tooltip_fg_color, 0.00)),
                                     color-stop(0.50, alpha(@theme_tooltip_fg_color, 0.15)),
@@ -49,7 +50,7 @@ GtkClutterOffscreen {
     border-width: 0;
 }
 
-.osd.toolbar .button:active {
+.osd .toolbar .button:active {
     background-image: none;
     background-color: alpha(@theme_tooltip_fg_color, 0.15);
 
@@ -59,7 +60,7 @@ GtkClutterOffscreen {
     border-width: 0;    
 }
 
-.osd.toolbar .button:active:hover {
+.osd .toolbar .button:active:hover {
     background-image: -gtk-gradient(linear, left top, left bottom,
                                     from(alpha(@theme_tooltip_fg_color, 0.15)),
                                     color-stop(0.50, alpha(@theme_tooltip_fg_color, 0.30)),
diff --git a/src/selections.js b/src/selections.js
index f6865e1..f8e502a 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -94,11 +94,12 @@ SelectionToolbar.prototype = {
 
         this.widget = new Gtk.Toolbar({ show_arrow: false,
                                         icon_size: Gtk.IconSize.LARGE_TOOLBAR });
-        this.widget.get_style_context().add_class('osd');
 
         this.actor = new GtkClutter.Actor({ contents: this.widget,
                                             show_on_set_parent: false,
                                             opacity: 0 });
+        let actorWidget = this.actor.get_widget();
+        actorWidget.get_style_context().add_class('osd');
 
         this._toolbarFavorite = new Gtk.ToggleToolButton({ icon_name: 'emblem-favorite-symbolic' });
         this.widget.insert(this._toolbarFavorite, 0);



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