[gnome-themes-standard] selection-mode: make selection-mode toolbar theming more generic
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] selection-mode: make selection-mode toolbar theming more generic
- Date: Thu, 16 Aug 2012 18:44:31 +0000 (UTC)
commit 076faf4e8626239535fbed6fed2389623d5d5c9a
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Aug 16 20:35:55 2012 +0200
selection-mode: make selection-mode toolbar theming more generic
Strip out the documents namespace, and expand the theming to support the
dark variation, since this will be used at least by Photos and Boxes as
well.
themes/Adwaita/gtk-3.0/borders/Makefile.am | 1 +
.../selection-toolbar-suggested-button-border.svg | 100 ++++++++++++++++++++
themes/Adwaita/gtk-3.0/gnome-applications.css | 58 -----------
themes/Adwaita/gtk-3.0/gtk-main-common.css | 10 ++
themes/Adwaita/gtk-3.0/gtk-main-dark.css | 4 +
themes/Adwaita/gtk-3.0/gtk-main.css | 4 +
themes/Adwaita/gtk-3.0/gtk-widgets.css | 59 ++++++++++++
themes/Adwaita/gtk-3.0/gtk.gresource.xml | 1 +
8 files changed, 179 insertions(+), 58 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/borders/Makefile.am b/themes/Adwaita/gtk-3.0/borders/Makefile.am
index c7e9ed7..19c04b8 100644
--- a/themes/Adwaita/gtk-3.0/borders/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/borders/Makefile.am
@@ -23,6 +23,7 @@ EXTRA_DIST = \
primary-toolbar-generic-border-dark.svg \
primary-toolbar-generic-border-unfocused.svg \
primary-toolbar-generic-border-unfocused-dark.svg \
+ selection-toolbar-button-suggested-border.svg \
tooltip-generic-border.svg \
tooltip-generic-border-dark.svg \
tooltip-generic-border-focused.svg \
diff --git a/themes/Adwaita/gtk-3.0/borders/selection-toolbar-suggested-button-border.svg b/themes/Adwaita/gtk-3.0/borders/selection-toolbar-suggested-button-border.svg
new file mode 100644
index 0000000..c9ae4f1
--- /dev/null
+++ b/themes/Adwaita/gtk-3.0/borders/selection-toolbar-suggested-button-border.svg
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16px"
+ height="16px"
+ id="svg33222"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="generic-border-alt.svg">
+ <defs
+ id="defs33224">
+ <linearGradient
+ id="linearGradient3845">
+ <stop
+ style="stop-color:#4e9a06;stop-opacity:1;"
+ offset="0"
+ id="stop3847" />
+ <stop
+ id="stop16295"
+ offset="1"
+ style="stop-color:#2f5d04;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3845"
+ id="linearGradient3851"
+ x1="8.0000019"
+ y1="1.5371597"
+ x2="8.000001"
+ y2="13.462841"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.0714286,0,-0.03571433)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#8e8e8e"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="-7.50355"
+ inkscape:cy="-0.54712037"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:window-width="1280"
+ inkscape:window-height="741"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-nodes="false"
+ inkscape:snap-bbox="true"
+ inkscape:showpageshadow="false"
+ showborder="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2992"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata33227">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ ry="2.6785715"
+ rx="2.5000005"
+ y="0.49999991"
+ x="0.5"
+ height="14.999999"
+ width="15"
+ id="rect17861"
+ style="color:#000000;fill:none;stroke:url(#linearGradient3851);stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ </g>
+</svg>
diff --git a/themes/Adwaita/gtk-3.0/gnome-applications.css b/themes/Adwaita/gtk-3.0/gnome-applications.css
index f6a1c5a..4ffe7ae 100644
--- a/themes/Adwaita/gtk-3.0/gnome-applications.css
+++ b/themes/Adwaita/gtk-3.0/gnome-applications.css
@@ -266,64 +266,6 @@ GtkIconView.documents-main-view.check:active {
background-color: transparent;
}
-.documents-selection-mode.toolbar {
- background-image: -gtk-gradient(linear, left top, left bottom,
- from(@documents_selection_toolbar_a),
- to(@documents_selection_toolbar_b));
- color: @theme_base_color;
-
- border-top-width: 1px;
- padding-top: 2px;
- border-color: @documents_selection_toolbar_border;
- border-style: solid;
-}
-
-.documents-selection-mode.toolbar .dim-label {
- color: alpha(@theme_base_color, 0.50);
-}
-
-.documents-selection-mode.toolbar .button {
- background-image: -gtk-gradient(linear, left top, left bottom,
- from(@documents_selection_button_a),
- color-stop(0.83, @documents_selection_button_b),
- to(@documents_selection_button_c));
-
- border-color: @documents_selection_toolbar_border;
- border-image: none;
- border-style: solid;
- border-width: 1px;
-
- color: @theme_base_color;
-}
-
-.documents-selection-mode.toolbar .button * {
- text-shadow: 0 1px shade(@documents_selection_toolbar_border, 0.90);
- icon-shadow: 0 1px shade(@documents_selection_toolbar_border, 0.90);
-}
-
-.documents-selection-mode.toolbar .button:hover {
- background-image: -gtk-gradient(linear, left top, left bottom,
- from(shade(@documents_selection_button_a, 1.20)),
- color-stop(0.83, shade(@documents_selection_button_b, 1.10)),
- to(shade(@documents_selection_button_c, 1.10)));
-}
-
-.documents-selection-mode.toolbar .button:active,
-.documents-selection-mode.toolbar .button:hover:active {
- background-image: -gtk-gradient(linear, left top, left bottom,
- from(@documents_selection_button_b),
- to(shade(@documents_selection_button_a, 0.90)));
-
- border-color: @documents_selection_toolbar_border;
- border-image: none;
- border-style: solid;
- border-width: 1px;
-}
-
-.documents-selection-mode.toolbar .button *:hover {
- color: @theme_base_color;
-}
-
.documents-icon-bg {
background-color: @documents_emblem_bg;
border-radius: 4px;
diff --git a/themes/Adwaita/gtk-3.0/gtk-main-common.css b/themes/Adwaita/gtk-3.0/gtk-main-common.css
index b177baf..cc6cf67 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main-common.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main-common.css
@@ -52,6 +52,16 @@
@define-color osd_trough_bg alpha(@osd_button_fg, 0.10);
+/**************************
+ * Selection Mode classes *
+ **************************/
+ define-color selection_toolbar_suggested_button_a #7fc141;
+ define-color selection_toolbar_suggested_button_b #47850d;
+ define-color selection_toolbar_suggested_button_c #4e9a06;
+
+ define-color selection_toolbar_suggested_button_fg #ffffff;
+ define-color selection_toolbar_suggested_button_shadow alpha(#000000, 0.20);
+
/*********************
* Error/Warning/... *
*********************/
diff --git a/themes/Adwaita/gtk-3.0/gtk-main-dark.css b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
index 342c6a2..2d55a50 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main-dark.css
@@ -107,6 +107,10 @@
@define-color primary_toolbar_button_text_shadow alpha(black, 0.1);
+ define-color selection_toolbar_bg #191c1d;
+ define-color selection_toolbar_fg shade(@theme_text_color, 0.80);
+ define-color selection_toolbar_border @internal_element_color;
+
@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 0a28364..5e65def 100644
--- a/themes/Adwaita/gtk-3.0/gtk-main.css
+++ b/themes/Adwaita/gtk-3.0/gtk-main.css
@@ -107,6 +107,10 @@
@define-color primary_toolbar_button_text_shadow alpha(black, 0.1);
+ define-color selection_toolbar_bg @theme_base_color;
+ define-color selection_toolbar_fg @internal_element_color;
+ define-color selection_toolbar_border @borders;
+
@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 08ee31b..a82d020 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -2394,6 +2394,63 @@ GtkOverlay.osd {
border-radius: 0;
}
+/**************************
+ * Selection Mode classes *
+ **************************/
+.selection-mode.toolbar {
+ color: @selection_toolbar_fg;
+ background-color: @selection_toolbar_bg;
+ text-shadow: 1px 1px @primary_toolbar_button_text_shadow;
+
+ border-top-width: 1px;
+ border-color: @selection_toolbar_border;
+ border-style: solid;
+ padding-top: 2px;
+}
+
+.selection-mode.toolbar .suggested-action.button {
+ background-image: linear-gradient(to bottom,
+ @selection_toolbar_suggested_button_a,
+ @selection_toolbar_suggested_button_b 83%,
+ @selection_toolbar_suggested_button_c);
+
+ border-image: url("borders/selection-toolbar-suggested-button-border.svg") 3 / 3px stretch;
+ border-width: 1px;
+
+ color: @selection_toolbar_suggested_button_fg;
+}
+
+.selection-mode.toolbar .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%,
+ shade(@selection_toolbar_suggested_button_c, 1.10));
+ color: @selection_toolbar_suggested_button_fg;
+}
+
+.selection-mode.toolbar .suggested-action.button:active,
+.selection-mode.toolbar .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 {
+ background-image: none;
+ border-image: none;
+ border-color: @unfocused_borders;
+}
+
+.selection-mode.toolbar .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 *:backdrop {
+ text-shadow: none;
+ icon-shadow: none;
+}
+
/****************
* GtkAssistant *
****************/
@@ -2875,11 +2932,13 @@ GtkInfoBar:last-child,
.dim-label:hover,
.dim-label:focus {
color: mix (@theme_fg_color, @theme_bg_color, 0.50);
+ text-shadow: none;
}
.dim-label:selected,
.dim-label:selected:focus {
color: mix (@theme_selected_fg_color, @theme_base_color, 0.50);
+ text-shadow: none;
}
/**********************
diff --git a/themes/Adwaita/gtk-3.0/gtk.gresource.xml b/themes/Adwaita/gtk-3.0/gtk.gresource.xml
index 121a62e..046f3b7 100644
--- a/themes/Adwaita/gtk-3.0/gtk.gresource.xml
+++ b/themes/Adwaita/gtk-3.0/gtk.gresource.xml
@@ -168,6 +168,7 @@
<file preprocess="to-pixdata">borders/primary-toolbar-generic-border.svg</file>
<file preprocess="to-pixdata">borders/primary-toolbar-generic-border-unfocused-dark.svg</file>
<file preprocess="to-pixdata">borders/primary-toolbar-generic-border-unfocused.svg</file>
+ <file preprocess="to-pixdata">borders/selection-toolbar-suggested-button-border.svg</file>
<file preprocess="to-pixdata">borders/tooltip-generic-border.svg</file>
<file preprocess="to-pixdata">borders/tooltip-generic-border-focused.svg</file>
<file preprocess="to-pixdata">borders/tooltip-generic-border-dark.svg</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]