[gnome-documents] toolbar: implement green style for selection mode toolbar
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] toolbar: implement green style for selection mode toolbar
- Date: Mon, 21 Nov 2011 15:50:50 +0000 (UTC)
commit 9e8377d6c073972b4f175b694ed557700a00053c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Nov 19 23:01:32 2011 -0500
toolbar: implement green style for selection mode toolbar
data/gtk-style.css | 24 ++++++++++++++++++++++++
src/mainToolbar.js | 9 +++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index 63a5ad6..ab9e32d 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -4,6 +4,30 @@
border-width: 0 1 1 1;
}
+.documents-selection-mode.toolbar {
+ background-image: -gtk-gradient(linear, left top, left bottom,
+ from(#8e9c80),
+ to(#4f6838));
+ color: alpha(#ffffff, 0.32);
+ border-width: 1 0 0 0;
+ border-color: #3e7b05;
+ border-style: solid;
+}
+
+.documents-selection-mode.toolbar .button {
+ background-image: -gtk-gradient(linear, left top, left bottom,
+ from(#7fc141),
+ color-stop(0.83, #47850d),
+ to(#4e9a06));
+ color: #ffffff;
+ text-shadow: none;
+ icon-shadow: none;
+ border-color: #3e7b05;
+ border-image: none;
+ border-style: solid;
+ border-width: 1;
+}
+
.documents-icon-bg {
background-color: #3465a4;
border-radius: 4;
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index d4ef421..411dbe1 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -108,6 +108,12 @@ MainToolbar.prototype = {
child = this._rightGroup.get_child();
if (child)
child.destroy();
+
+ let context = this.widget.get_style_context();
+ if (context.has_class('documents-selection-mode')) {
+ context.remove_class('documents-selection-mode');
+ this.widget.reset_style();
+ }
},
_buildViewSelector: function() {
@@ -156,6 +162,9 @@ MainToolbar.prototype = {
},
_populateForSelectionMode: function() {
+ this.widget.get_style_context().add_class('documents-selection-mode');
+ this.widget.reset_style();
+
// centered label
this._whereLabel = new Gtk.Label({ no_show_all: true });
this._selectionLabel = new Gtk.Label();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]