[gnome-documents] selections: first attempt at a style for OSD toolbars



commit 81a4e09c5a61568f9b9bbf6ca24205577c13b2c5
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Oct 27 22:38:16 2011 -0400

    selections: first attempt at a style for OSD toolbars

 data/gtk-style.css |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/selections.js  |    4 ++-
 2 files changed, 62 insertions(+), 1 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index 6b1aa61..cf921d3 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -1,4 +1,7 @@
 /* GTK+ custom style here */
+GtkClutterOffscreen {
+    background-color: alpha(#000, 0.00);
+}
 
 #ViewLoadMore {
     border-image-width: 0 2 2 2;
@@ -11,3 +14,59 @@
 
     color: #ffffff;
 }
+
+.osd.toolbar {
+    padding: 6 6;
+    border-style: none;
+    border-radius: 5;
+    border-width: 0;
+
+    background-image: none;
+    background-color: alpha(@theme_tooltip_bg_color, 0.90);
+    color: @theme_tooltip_fg_color;
+
+    text-shadow: 1 1 black;
+    icon-shadow: 1 1 black;
+}
+
+.osd.toolbar .favorite {
+    color: shade(@theme_selected_bg_color, 1.20);
+}
+
+.osd.toolbar .separator {
+    color: alpha(@theme_tooltip_fg_color, 0.30);
+}
+
+.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)),
+                                    to(alpha(@theme_tooltip_fg_color, 0.00)));
+
+    border-image: none;
+    border-style: none;
+    border-radius: 2;
+    border-width: 0;
+}
+
+.osd.toolbar .button:active {
+    background-image: none;
+    background-color: alpha(@theme_tooltip_fg_color, 0.15);
+
+    border-image: none;
+    border-style: none;
+    border-radius: 2;
+    border-width: 0;    
+}
+
+.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)),
+                                    to(alpha(@theme_tooltip_fg_color, 0.15)));
+
+    border-style: none;
+    border-image: none;
+    border-radius: 2;
+    border-width: 0;    
+}
diff --git a/src/selections.js b/src/selections.js
index 21ef32f..f6865e1 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -93,7 +93,9 @@ SelectionToolbar.prototype = {
         this._insideRefresh = false;
 
         this.widget = new Gtk.Toolbar({ show_arrow: false,
-                                        icon_size: Gtk.IconSize.MENU });
+                                        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 });



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