[gnome-themes-standard] buttons: add a CSS style class for suggested-action buttons
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] buttons: add a CSS style class for suggested-action buttons
- Date: Mon, 20 Aug 2012 17:28:13 +0000 (UTC)
commit 47a94748b52ee30d4843d22b094469284d158168
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Aug 20 19:26:07 2012 +0200
buttons: add a CSS style class for suggested-action buttons
We implemented this a couple of days ago, but only for selection-mode
toolbars; this is a more generic theming for generic suggested-action
buttons outside of such toolbars.
themes/Adwaita/gtk-3.0/gtk-main-dark.css | 6 +++
themes/Adwaita/gtk-3.0/gtk-main.css | 6 +++
themes/Adwaita/gtk-3.0/gtk-widgets.css | 73 +++++++++++++++++++++++++++---
3 files changed, 78 insertions(+), 7 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-main-dark.css b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
index 9994430..09882b7 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
@@ -119,6 +119,12 @@
@define-color app_notification_border #555357;
+ define-color suggested_action_button_a #407cbc;
+ define-color suggested_action_button_b #2a5285;
+ define-color suggested_action_button_border #204a87;
+ define-color suggested_action_button_fg #ffffff;
+ define-color suggested_action_button_shadow transparent;
+
@define-color treeview_focus_border shade (@theme_selected_bg_color, 1.20);
@define-color view_separators shade (@internal_element_color, 0.90);
diff --git a/themes/Adwaita/gtk-3.0/gtk-main.css b/themes/Adwaita/gtk-3.0/gtk-main.css
index 889eca3..a83882c 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main.css
@@ -119,6 +119,12 @@
@define-color app_notification_border #949486;
+ define-color suggested_action_button_a #74a9e0;
+ define-color suggested_action_button_b #4287cf;
+ define-color suggested_action_button_border #204a87;
+ define-color suggested_action_button_fg #ffffff;
+ define-color suggested_action_button_shadow shade(@suggested_action_button_border, 1.15);
+
@define-color treeview_focus_border #2a79cb;
@define-color view_separators shade(@borders, 1.30);
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 9f70305..8b1fb3e 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -2394,6 +2394,55 @@ GtkOverlay.osd {
border-radius: 0;
}
+/****************************
+ * Suggested action buttons *
+ ****************************/
+.suggested-action.button {
+ background-image: linear-gradient(to bottom,
+ @suggested_action_button_a,
+ @suggested_action_button_b);
+ border-image: none;
+ border-color: @suggested_action_button_border;
+ border-width: 1px;
+
+ color: @suggested_action_button_fg;
+ text-shadow: 0 -1px @suggested_action_button_shadow;
+}
+
+.suggested-action.button:hover {
+ background-image: linear-gradient(to bottom,
+ shade(@suggested_action_button_a, 1.10),
+ shade(@suggested_action_button_b, 1.05));
+}
+
+.suggested-action.button:active,
+.suggested-action.button:hover:active {
+ background-image: linear-gradient(to bottom,
+ @suggested_action_button_b,
+ @suggested_action_button_a);
+}
+
+.suggested-action.button:backdrop {
+ background-image: none;
+ border-image: none;
+ border-color: @unfocused_borders;
+}
+
+.suggested-action.button *:hover,
+.suggested-action.button *:active,
+.suggested-action.button *:hover:active {
+ color: @suggested_action_button_fg;
+}
+
+.suggested-action.button *:active,
+.suggested-action.button *:hover:active {
+ text-shadow: 0 -1px shade(@suggested_action_button_shadow, 1.15);
+}
+
+.suggested-action.button *:backdrop {
+ text-shadow: none;
+}
+
/**************************
* Selection Mode classes *
**************************/
@@ -2408,7 +2457,8 @@ GtkOverlay.osd {
padding-top: 2px;
}
-.selection-mode.toolbar .suggested-action.button {
+.selection-mode.toolbar .suggested-action.button,
+.selection-mode.toolbar GtkToolButton.suggested-action .button {
background-image: linear-gradient(to bottom,
@selection_toolbar_suggested_button_a,
@selection_toolbar_suggested_button_b 83%,
@@ -2420,7 +2470,8 @@ GtkOverlay.osd {
color: @selection_toolbar_suggested_button_fg;
}
-.selection-mode.toolbar .suggested-action.button:hover {
+.selection-mode.toolbar .suggested-action.button:hover,
+.selection-mode.toolbar GtkToolButton.suggested-action .button:hover {
background-image: linear-gradient(to bottom,
shade(@selection_toolbar_suggested_button_a, 1.20),
shade(@selection_toolbar_suggested_button_b, 1.10) 83%,
@@ -2428,30 +2479,38 @@ GtkOverlay.osd {
}
.selection-mode.toolbar .suggested-action.button:active,
-.selection-mode.toolbar .suggested-action.button:hover:active {
+.selection-mode.toolbar .suggested-action.button:hover:active,
+.selection-mode.toolbar GtkToolButton.suggested-action .button:active,
+.selection-mode.toolbar GtkToolButton.suggested-action .button:hover:active {
background-image: linear-gradient(to bottom,
@selection_toolbar_suggested_button_b,
shade(@selection_toolbar_suggested_button_a, 0.90));
}
-.selection-mode.toolbar .suggested-action.button:backdrop {
+.selection-mode.toolbar .suggested-action.button:backdrop,
+.selection-mode.toolbar GtkToolButton.suggested-action .button:backdrop {
background-image: none;
border-image: none;
border-color: @unfocused_borders;
}
-.selection-mode.toolbar .suggested-action.button * {
+.selection-mode.toolbar .suggested-action.button *,
+.selection-mode.toolbar GtkToolButton.suggested-action .button * {
text-shadow: 0 1px @selection_toolbar_suggested_button_shadow;
icon-shadow: 0 1px @selection_toolbar_suggested_button_shadow;
}
.selection-mode.toolbar .suggested-action.button *:hover,
.selection-mode.toolbar .suggested-action.button *:active,
-.selection-mode.toolbar .suggested-action.button *:hover:active {
+.selection-mode.toolbar .suggested-action.button *:hover:active,
+.selection-mode.toolbar GtkToolButton.suggested-action .button *:hover,
+.selection-mode.toolbar GtkToolButton.suggested-action .button *:active,
+.selection-mode.toolbar GtkToolButton.suggested-action .button *:hover:active {
color: @selection_toolbar_suggested_button_fg;
}
-.selection-mode.toolbar .suggested-action.button *:backdrop {
+.selection-mode.toolbar .suggested-action.button *:backdrop,
+.selection-mode.toolbar GtkToolButton.suggested-action .button *:backdrop {
text-shadow: none;
icon-shadow: none;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]