[gnome-themes-standard] no need anymore to esplicitelly set $colored on button drawind function



commit 775772a76bc2dc08bfb620c9d5e21e705fa8253a
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon May 26 17:10:34 2014 +0200

    no need anymore to esplicitelly set $colored on button drawind function

 themes/Adwaita/gtk-3.0/_common.scss           |   12 ++-
 themes/Adwaita/gtk-3.0/_drawing.scss          |   11 +-
 themes/Adwaita/gtk-3.0/gtk-contained-dark.css |  139 +++++++++++++------------
 themes/Adwaita/gtk-3.0/gtk-contained.css      |  133 ++++++++++++------------
 4 files changed, 153 insertions(+), 142 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/_common.scss b/themes/Adwaita/gtk-3.0/_common.scss
index 9214c78..a0b3ba9 100644
--- a/themes/Adwaita/gtk-3.0/_common.scss
+++ b/themes/Adwaita/gtk-3.0/_common.scss
@@ -180,7 +180,7 @@ GtkGrid:insensitive {
     border-color: $selected_bg_color;
     box-shadow: inset 0 2px 2px -2px transparentize(black,0.6),
                 // focus indicator
-                inset 0 0 2px 1px transparentize($selected_bg_color, 0.5),                0 1px 
$borders_edge; /* not working */
+                inset 0 0 2px 1px transparentize($selected_bg_color, 0.5),                      0 1px 
$borders_edge; /* not working */
   }
   &:selected, &:backdrop:selected { 
     color: $selected_fg_color;
@@ -263,12 +263,12 @@ GtkGrid:insensitive {
   @each $b_type, $b_color in (suggested-action, $selected_bg_color), 
                               (destructive-action, $destructive_color) {
     &.#{$b_type} {
-      @include button(normal,$b_color, white, true); //FIXME: perhaps we should derive from bg color?
+      @include button(normal,$b_color, white); //FIXME: perhaps we should derive from bg color?
       &:hover {
-        @include button(hover,$b_color, white, true);
+        @include button(hover,$b_color, white);
       }
       &:active { 
-        @include button(active,$b_color, white, true);
+        @include button(active,$b_color, white);
       }
       &:backdrop {
         @include button(backdrop,$b_color);
@@ -350,6 +350,7 @@ GtkColorButton.button { // Uniform padding on the GtkColorButton.button
  *****************/
 
 .spinbutton {
+  box-shadow: 0 1px $borders_edge;
   .button {
     background-image: none;
     border-width: 0 0 0 1px;
@@ -374,6 +375,7 @@ GtkColorButton.button { // Uniform padding on the GtkColorButton.button
   }
   &.vertical {
     .button {
+      //FIXME box-shadow outset needs to be removed
       @include button(normal);
       &:first-child { border-radius: 3px 3px 0 0; }
       &:last-child { border-radius: 0 0 3px 3px; }
@@ -396,6 +398,8 @@ GtkComboBox {
 
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
+
+  box-shadow: 0 1px $borders_edge;
   
   @include _button_text_shadow;
 
diff --git a/themes/Adwaita/gtk-3.0/_drawing.scss b/themes/Adwaita/gtk-3.0/_drawing.scss
index 658ae3d..fef1b95 100644
--- a/themes/Adwaita/gtk-3.0/_drawing.scss
+++ b/themes/Adwaita/gtk-3.0/_drawing.scss
@@ -52,7 +52,7 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
   @else { box-shadow: $shadow1; }
 }
 
- mixin button($t, $c:$theme_bg_color, $tc:$theme_fg_color, $colored_button:false ) {
+ mixin button($t, $c:$theme_bg_color, $tc:$theme_fg_color, $shadow:false ) {
 //
 // Button drawing function
 // 
@@ -87,7 +87,7 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
                                   );
     }
 
-    @if $colored_button { @include _button_border_color($c); }
+    @if $c!=$theme_bg_color { @include _button_border_color($c); }
     @else { border-color: $borders_color; }
 
     @include _button_text_shadow($tc,$c);
@@ -110,7 +110,7 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
 
   @else if $t==active { // pushed button
     color: $tc;
-    @if $colored_button { @include _button_border_color($c); }
+    @if $c!=$theme_bg_color { @include _button_border_color($c); }
     @else { border-color: $borders_color; }
     @if $variant == 'light' {
       background-image: linear-gradient(to bottom,
@@ -136,7 +136,8 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    @include _button_box_shadow($widget_bottom_hilight);
+    @include _button_box_shadow(inset 0 1px transparentize(white,1),
+                                $widget_bottom_hilight);
   }
   @else if $t==insensitive-active {
   //
@@ -154,7 +155,7 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: none;
+    box-shadow: inset 0 1px transparentize(white,1);
   }
 
   @else if $t==backdrop-active { // backdrop pushed button
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
index d9a9fc6..752149e 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
@@ -197,7 +197,7 @@ GtkGrid:insensitive {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: none; }
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
     .button:backdrop:active {
       border-width: 1px;
       border-style: solid;
@@ -225,7 +225,7 @@ GtkGrid:insensitive {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
     .button:insensitive:active {
       border-width: 1px;
       border-style: solid;
@@ -268,7 +268,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: none; }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
       .button.suggested-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -283,7 +283,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
   .button.destructive-action {
     border-width: 1px;
     border-style: solid;
@@ -319,7 +319,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: none; }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
       .button.destructive-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -334,7 +334,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
 
 GtkColorButton.button {
   padding: 4px; }
@@ -377,73 +377,75 @@ GtkColorButton.button {
 /*****************
  * GtkSpinButton *
  *****************/
-.spinbutton .button {
-  background-image: none;
-  border-width: 0 0 0 1px;
-  border-color: rgba(28, 31, 31, 0.3);
-  border-radius: 0;
-  box-shadow: none; }
-  .spinbutton .button:insensitive {
-    color: rgba(255, 255, 255, 0.3); }
-  .spinbutton .button:active {
-    box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.2); }
-  .spinbutton .button:backdrop {
-    border-color: rgba(28, 31, 31, 0.3); }
-  .spinbutton .button:backdrop:insensitive {
-    border-width: 0 0 0 1px;
-    color: rgba(255, 255, 255, 0.3); }
-.spinbutton.vertical .button {
-  border-width: 1px;
-  border-style: solid;
-  color: #eeeeec;
-  background-image: linear-gradient(to bottom, #454c4c, #393f3f 40%, #2d3232);
-  border-color: #1c1f1f;
-  text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
-  icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
-  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
-  .spinbutton.vertical .button:first-child {
-    border-radius: 3px 3px 0 0; }
-  .spinbutton.vertical .button:last-child {
-    border-radius: 0 0 3px 3px; }
-  .spinbutton.vertical .button:active {
-    border-width: 1px;
-    border-style: solid;
-    color: #eeeeec;
-    border-color: #1c1f1f;
-    background-image: linear-gradient(to bottom, #212424, #2d3232 3%);
-    text-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
-    icon-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
-    box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.3), 0 1px rgba(238, 238, 236, 0.1); }
-  .spinbutton.vertical .button:insensitive {
-    border-width: 1px;
-    border-style: solid;
-    color: white;
-    border-color: #1c1f1f;
+.spinbutton {
+  box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
+  .spinbutton .button {
     background-image: none;
-    text-shadow: none;
-    icon-shadow: none;
-    box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
-  .spinbutton.vertical .button:backdrop {
-    border-width: 1px;
-    border-style: solid;
-    color: #eeeeec;
-    border-color: #1c1f1f;
-    background-image: none;
-    text-shadow: none;
-    icon-shadow: none;
+    border-width: 0 0 0 1px;
+    border-color: rgba(28, 31, 31, 0.3);
+    border-radius: 0;
     box-shadow: none; }
-  .spinbutton.vertical .button:hover {
+    .spinbutton .button:insensitive {
+      color: rgba(255, 255, 255, 0.3); }
+    .spinbutton .button:active {
+      box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.2); }
+    .spinbutton .button:backdrop {
+      border-color: rgba(28, 31, 31, 0.3); }
+    .spinbutton .button:backdrop:insensitive {
+      border-width: 0 0 0 1px;
+      color: rgba(255, 255, 255, 0.3); }
+  .spinbutton.vertical .button {
     border-width: 1px;
     border-style: solid;
     color: #eeeeec;
-    border-color: #212424;
-    background-image: linear-gradient(to bottom, #5b6464, #434a4a 40%, #393f3f);
-    text-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
-    icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+    background-image: linear-gradient(to bottom, #454c4c, #393f3f 40%, #2d3232);
+    border-color: #1c1f1f;
+    text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
+    icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
-.spinbutton.vertical.entry {
-  border-radius: 0;
-  border-width: 0 1px 0 1px; }
+    .spinbutton.vertical .button:first-child {
+      border-radius: 3px 3px 0 0; }
+    .spinbutton.vertical .button:last-child {
+      border-radius: 0 0 3px 3px; }
+    .spinbutton.vertical .button:active {
+      border-width: 1px;
+      border-style: solid;
+      color: #eeeeec;
+      border-color: #1c1f1f;
+      background-image: linear-gradient(to bottom, #212424, #2d3232 3%);
+      text-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
+      icon-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
+      box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.3), 0 1px rgba(238, 238, 236, 0.1); }
+    .spinbutton.vertical .button:insensitive {
+      border-width: 1px;
+      border-style: solid;
+      color: white;
+      border-color: #1c1f1f;
+      background-image: none;
+      text-shadow: none;
+      icon-shadow: none;
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
+    .spinbutton.vertical .button:backdrop {
+      border-width: 1px;
+      border-style: solid;
+      color: #eeeeec;
+      border-color: #1c1f1f;
+      background-image: none;
+      text-shadow: none;
+      icon-shadow: none;
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+    .spinbutton.vertical .button:hover {
+      border-width: 1px;
+      border-style: solid;
+      color: #eeeeec;
+      border-color: #212424;
+      background-image: linear-gradient(to bottom, #5b6464, #434a4a 40%, #393f3f);
+      text-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+      icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
+  .spinbutton.vertical.entry {
+    border-radius: 0;
+    border-width: 0 1px 0 1px; }
 
 /**************
  * ComboBoxes *
@@ -452,6 +454,7 @@ GtkComboBox {
   padding: 0;
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
+  box-shadow: 0 1px rgba(238, 238, 236, 0.1);
   text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
   icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176); }
   GtkComboBox:insensitive {
@@ -702,5 +705,5 @@ GtkScrolledWindow.frame {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: none;
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
     border-color: transparent; }
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained.css b/themes/Adwaita/gtk-3.0/gtk-contained.css
index d1f2e67..8c8104b 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained.css
@@ -197,7 +197,7 @@ GtkGrid:insensitive {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: none; }
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
     .button:backdrop:active {
       border-width: 1px;
       border-style: solid;
@@ -225,7 +225,7 @@ GtkGrid:insensitive {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: 0 1px white; }
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
     .button:insensitive:active {
       border-width: 1px;
       border-style: solid;
@@ -268,7 +268,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: none; }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
       .button.suggested-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -283,7 +283,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: 0 1px white; }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
   .button.destructive-action {
     border-width: 1px;
     border-style: solid;
@@ -319,7 +319,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: none; }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
       .button.destructive-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -334,7 +334,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: 0 1px white; }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
 
 GtkColorButton.button {
   padding: 4px; }
@@ -377,73 +377,75 @@ GtkColorButton.button {
 /*****************
  * GtkSpinButton *
  *****************/
-.spinbutton .button {
-  background-image: none;
-  border-width: 0 0 0 1px;
-  border-color: rgba(161, 161, 161, 0.3);
-  border-radius: 0;
-  box-shadow: none; }
-  .spinbutton .button:insensitive {
-    color: rgba(116, 132, 137, 0.3); }
-  .spinbutton .button:active {
-    box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.2); }
-  .spinbutton .button:backdrop {
-    border-color: rgba(161, 161, 161, 0.3); }
-  .spinbutton .button:backdrop:insensitive {
-    border-width: 0 0 0 1px;
-    color: rgba(199, 199, 199, 0.3); }
-.spinbutton.vertical .button {
-  border-width: 1px;
-  border-style: solid;
-  color: #2e3436;
-  background-image: linear-gradient(to bottom, white, #ededed 40%, lightgray);
-  border-color: #a1a1a1;
-  text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
-  icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
-  box-shadow: inset 0 1px white, 0 1px white; }
-  .spinbutton.vertical .button:first-child {
-    border-radius: 3px 3px 0 0; }
-  .spinbutton.vertical .button:last-child {
-    border-radius: 0 0 3px 3px; }
-  .spinbutton.vertical .button:active {
-    border-width: 1px;
-    border-style: solid;
-    color: #2e3436;
-    border-color: #a1a1a1;
-    background-image: linear-gradient(to bottom, #c7c7c7, #d1d1d1 3%, lightgray);
-    text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
-    icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
-    box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.3), 0 1px white; }
-  .spinbutton.vertical .button:insensitive {
-    border-width: 1px;
-    border-style: solid;
-    color: #748489;
-    border-color: #a1a1a1;
-    background-image: none;
-    text-shadow: none;
-    icon-shadow: none;
-    box-shadow: 0 1px white; }
-  .spinbutton.vertical .button:backdrop {
-    border-width: 1px;
-    border-style: solid;
-    color: #454f52;
-    border-color: #a1a1a1;
+.spinbutton {
+  box-shadow: 0 1px white; }
+  .spinbutton .button {
     background-image: none;
-    text-shadow: none;
-    icon-shadow: none;
+    border-width: 0 0 0 1px;
+    border-color: rgba(161, 161, 161, 0.3);
+    border-radius: 0;
     box-shadow: none; }
-  .spinbutton.vertical .button:hover {
+    .spinbutton .button:insensitive {
+      color: rgba(116, 132, 137, 0.3); }
+    .spinbutton .button:active {
+      box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.2); }
+    .spinbutton .button:backdrop {
+      border-color: rgba(161, 161, 161, 0.3); }
+    .spinbutton .button:backdrop:insensitive {
+      border-width: 0 0 0 1px;
+      color: rgba(199, 199, 199, 0.3); }
+  .spinbutton.vertical .button {
     border-width: 1px;
     border-style: solid;
     color: #2e3436;
+    background-image: linear-gradient(to bottom, white, #ededed 40%, lightgray);
     border-color: #a1a1a1;
-    background-image: linear-gradient(to bottom, white, #f7f7f7 40%, #ededed);
     text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     box-shadow: inset 0 1px white, 0 1px white; }
-.spinbutton.vertical.entry {
-  border-radius: 0;
-  border-width: 0 1px 0 1px; }
+    .spinbutton.vertical .button:first-child {
+      border-radius: 3px 3px 0 0; }
+    .spinbutton.vertical .button:last-child {
+      border-radius: 0 0 3px 3px; }
+    .spinbutton.vertical .button:active {
+      border-width: 1px;
+      border-style: solid;
+      color: #2e3436;
+      border-color: #a1a1a1;
+      background-image: linear-gradient(to bottom, #c7c7c7, #d1d1d1 3%, lightgray);
+      text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.3), 0 1px white; }
+    .spinbutton.vertical .button:insensitive {
+      border-width: 1px;
+      border-style: solid;
+      color: #748489;
+      border-color: #a1a1a1;
+      background-image: none;
+      text-shadow: none;
+      icon-shadow: none;
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
+    .spinbutton.vertical .button:backdrop {
+      border-width: 1px;
+      border-style: solid;
+      color: #454f52;
+      border-color: #a1a1a1;
+      background-image: none;
+      text-shadow: none;
+      icon-shadow: none;
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+    .spinbutton.vertical .button:hover {
+      border-width: 1px;
+      border-style: solid;
+      color: #2e3436;
+      border-color: #a1a1a1;
+      background-image: linear-gradient(to bottom, white, #f7f7f7 40%, #ededed);
+      text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+      box-shadow: inset 0 1px white, 0 1px white; }
+  .spinbutton.vertical.entry {
+    border-radius: 0;
+    border-width: 0 1px 0 1px; }
 
 /**************
  * ComboBoxes *
@@ -452,6 +454,7 @@ GtkComboBox {
   padding: 0;
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
+  box-shadow: 0 1px white;
   text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
   icon-shadow: 0 1px rgba(255, 255, 255, 0.76923); }
   GtkComboBox:insensitive {
@@ -702,5 +705,5 @@ GtkScrolledWindow.frame {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: none;
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
     border-color: transparent; }


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