[gnome-themes-standard] dark: fix active switch slider and trough states for the dark theme



commit b49cf4a52b66e2eee3b761e6e09a738bcb59a60b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Oct 24 15:04:14 2011 -0400

    dark: fix active switch slider and trough states for the dark theme
    
    This also removes the SVG assets we used for the switch sliders,
    replacing them with a regular border together with a box-shadow.

 themes/Adwaita/gtk-3.0/assets/Makefile.am          |    2 -
 .../gtk-3.0/assets/switch-slider-active-border.svg |  105 --------------------
 .../gtk-3.0/assets/switch-slider-border.svg        |  105 --------------------
 .../trough-active-border-horizontal-dark.svg       |   22 ++--
 .../assets/trough-active-border-vertical-dark.svg  |   12 +-
 themes/Adwaita/gtk-3.0/gtk-dark.css                |    4 +-
 themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css |    9 --
 themes/Adwaita/gtk-3.0/gtk-widgets-assets.css      |    8 --
 themes/Adwaita/gtk-3.0/gtk-widgets.css             |    9 +-
 themes/Adwaita/gtk-3.0/gtk.css                     |    2 +-
 10 files changed, 26 insertions(+), 252 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/assets/Makefile.am b/themes/Adwaita/gtk-3.0/assets/Makefile.am
index 6807e6d..24c7541 100644
--- a/themes/Adwaita/gtk-3.0/assets/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/assets/Makefile.am
@@ -83,8 +83,6 @@ assets_DATA = 		\
 	sidebar-radio-selected.svg \
 	sidebar-radio-selected-dark.svg \
 	sidebar-radio-selected-prelight.svg \
-	switch-slider-border.svg \
-	switch-slider-active-border.svg \
 	trough-border-horizontal.svg \
 	trough-border-horizontal-dark.svg \
 	trough-border-vertical.svg \
diff --git a/themes/Adwaita/gtk-3.0/assets/trough-active-border-horizontal-dark.svg b/themes/Adwaita/gtk-3.0/assets/trough-active-border-horizontal-dark.svg
index eea27c3..a28ed51 100644
--- a/themes/Adwaita/gtk-3.0/assets/trough-active-border-horizontal-dark.svg
+++ b/themes/Adwaita/gtk-3.0/assets/trough-active-border-horizontal-dark.svg
@@ -15,7 +15,7 @@
    id="svg19404"
    version="1.1"
    inkscape:version="0.48.1 r9760"
-   sodipodi:docname="scale-trough-border-progress-horizontal.svg">
+   sodipodi:docname="trough-active-border-horizontal-dark.svg">
   <defs
      id="defs19406">
     <linearGradient
@@ -52,11 +52,11 @@
     <linearGradient
        id="linearGradient4759">
       <stop
-         style="stop-color:#914100;stop-opacity:1;"
+         style="stop-color:#1c3350;stop-opacity:1;"
          offset="0"
          id="stop4761" />
       <stop
-         style="stop-color:#ce5c00;stop-opacity:1;"
+         style="stop-color:#1f3959;stop-opacity:1;"
          offset="1"
          id="stop4763" />
     </linearGradient>
@@ -72,10 +72,10 @@
        inkscape:collect="always" />
     <linearGradient
        gradientTransform="matrix(0.16730591,0,0,3.3332328,-6.2354097,-765.68415)"
-       y2="235.67775"
-       x2="-18.164774"
-       y1="230.23718"
-       x1="-18.164774"
+       y2="234.52895"
+       x2="-7.3942027"
+       y1="229.77534"
+       x1="-7.3942027"
        gradientUnits="userSpaceOnUse"
        id="linearGradient19484"
        xlink:href="#linearGradient4759"
@@ -89,7 +89,7 @@
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
      inkscape:zoom="22.197802"
-     inkscape:cx="4.7438555"
+     inkscape:cx="5.1159863"
      inkscape:cy="4.3960396"
      inkscape:current-layer="layer1"
      showgrid="true"
@@ -97,7 +97,7 @@
      inkscape:document-units="px"
      inkscape:window-width="1124"
      inkscape:window-height="797"
-     inkscape:window-x="84"
+     inkscape:window-x="83"
      inkscape:window-y="193"
      inkscape:window-maximized="0" />
   <metadata
@@ -108,7 +108,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
   </metadata>
@@ -135,7 +135,7 @@
        height="12"
        width="1"
        id="rect6687"
-       style="opacity:1;fill:#dddddd;fill-opacity:0.50196081;stroke:none;display:inline;enable-background:new"
+       style="opacity:1;fill:#3465a4;fill-opacity:0.27450982;stroke:none;display:inline;enable-background:new"
        transform="matrix(0,1,-1,0,0,0)" />
   </g>
 </svg>
diff --git a/themes/Adwaita/gtk-3.0/assets/trough-active-border-vertical-dark.svg b/themes/Adwaita/gtk-3.0/assets/trough-active-border-vertical-dark.svg
index 9410aca..f5ec5c2 100644
--- a/themes/Adwaita/gtk-3.0/assets/trough-active-border-vertical-dark.svg
+++ b/themes/Adwaita/gtk-3.0/assets/trough-active-border-vertical-dark.svg
@@ -15,7 +15,7 @@
    id="svg19404"
    version="1.1"
    inkscape:version="0.48.1 r9760"
-   sodipodi:docname="scale-trough-border-progress-horizontal-dark.svg">
+   sodipodi:docname="trough-active-border-vertical-dark.svg">
   <defs
      id="defs19406">
     <linearGradient
@@ -52,11 +52,11 @@
     <linearGradient
        id="linearGradient4759">
       <stop
-         style="stop-color:#914100;stop-opacity:1;"
+         style="stop-color:#1c3350;stop-opacity:1;"
          offset="0"
          id="stop4761" />
       <stop
-         style="stop-color:#ce5c00;stop-opacity:1;"
+         style="stop-color:#1f3959;stop-opacity:1;"
          offset="1"
          id="stop4763" />
     </linearGradient>
@@ -89,7 +89,7 @@
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
      inkscape:zoom="22.197802"
-     inkscape:cx="4.7438555"
+     inkscape:cx="-3.410105"
      inkscape:cy="4.3960396"
      inkscape:current-layer="layer1"
      showgrid="true"
@@ -108,7 +108,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
   </metadata>
@@ -135,7 +135,7 @@
        height="1"
        width="12"
        id="rect6687"
-       style="fill:#dddddd;fill-opacity:0.50196078;stroke:none;display:inline;enable-background:new"
+       style="fill:#3465a4;fill-opacity:0.27450982;stroke:none;display:inline;enable-background:new"
        transform="matrix(0,1,-1,0,0,0)" />
   </g>
 </svg>
diff --git a/themes/Adwaita/gtk-3.0/gtk-dark.css b/themes/Adwaita/gtk-3.0/gtk-dark.css
index eb79e11..b5333e9 100644
--- a/themes/Adwaita/gtk-3.0/gtk-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-dark.css
@@ -46,8 +46,8 @@
 @define-color notebook_tab_gradient_a @button_gradient_color_a;
 @define-color notebook_tab_gradient_b @button_gradient_color_b;
 
- define-color switch_slider_color #111113;
- define-color switch_slider_border #a5b8cc;
+ define-color switch_slider_color shade(@theme_bg_color, 0.95);
+ define-color switch_slider_active_border shade(@active_switch_bg_color_a, 0.60);
 @define-color switch_slider_insensitive_bg @insensitive_border_color;
 
 @define-color switch_trough_active_color @theme_text_color;
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css b/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css
index 8e53df2..2282e90 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css
@@ -250,12 +250,3 @@ GtkScale.scale-has-marks-below.slider.vertical:insensitive {
 .progressbar.vertical {
     border-image: url("assets/progressbar-border-vertical-dark.svg") 3 / 3 stretch;
 }
-
-/* TODO: need dark versions */
-GtkSwitch.slider {
-    border-image: url("assets/switch-slider-border.svg") 2 / 2 stretch;
-}
-
-GtkSwitch.slider:active {
-    border-image: url("assets/switch-slider-active-border.svg") 2 / 2 stretch;
-}
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css b/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css
index 86a08a3..cb1b86b 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css
@@ -154,14 +154,6 @@ GtkScale.progressbar.vertical {
     border-image: url("assets/trough-active-border-vertical.svg") 2 / 2 stretch;
 }
 
-GtkSwitch.slider {
-    border-image: url("assets/switch-slider-border.svg") 2 / 2 stretch;
-}
-
-GtkSwitch.slider:active {
-    border-image: url("assets/switch-slider-active-border.svg") 2 / 2 stretch;
-}
-
 .progressbar,
 .entry.progressbar,
 .progressbar row,
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 6c24b56..1b8e2ad 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -1380,8 +1380,10 @@ GtkSwitch.trough:insensitive {
 GtkSwitch.slider {
     border-width: 1;
     border-radius: 1;
-    border-style: none;
-    /* border-image defined in -assets variant */
+    border-style: solid;
+    border-color: shade(@switch_slider_color, 0.75);
+
+    box-shadow: 0 -1 inset alpha(@theme_base_color, 0.50);
 
     padding: 2;
 
@@ -1394,11 +1396,12 @@ GtkSwitch.slider {
 }
 
 GtkSwitch.slider:active {
-    border-color: @switch_slider_border;
+    border-color: @switch_slider_active_border;
 }
 
 GtkSwitch.slider:insensitive {
     border-image: none;
+    box-shadow: none;
 
     background-image: none;
     background-color: @switch_slider_insensitive_bg;
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 6321e31..9f3a2d9 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -82,7 +82,7 @@
 @define-color active_switch_bg_color_b #84b8ee;
 
 @define-color switch_slider_color #eeeeec;
- define-color switch_slider_border #2a79cb;
+ define-color switch_slider_active_border #2a79cb;
 @define-color switch_slider_insensitive_bg @insensitive_bg_color;
 
 @define-color switch_trough_active_color @theme_base_color;



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