[gnome-themes-standard] use extends for linked buttons/entries



commit ceb839d84a77b449695dc4a259111c174db08f2f
Author: Jakub Steiner <jimmac gmail com>
Date:   Tue May 13 11:56:02 2014 +0200

    use extends for linked buttons/entries

 themes/Adwaita/gtk-3.0/_common.scss  |   32 ++++++++++++++++++++++++++++++-
 themes/Adwaita/gtk-3.0/_drawing.scss |   17 ++++++++-------
 themes/Adwaita/gtk-3.0/gtk-dark.css  |   29 +++++++++++++++++++++++----
 themes/Adwaita/gtk-3.0/gtk.css       |   35 ++++++++++++++++++++++++++-------
 themes/Adwaita/gtk-3.0/gtk.scss      |    2 +-
 5 files changed, 92 insertions(+), 23 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/_common.scss b/themes/Adwaita/gtk-3.0/_common.scss
index a6a4bad..a240685 100644
--- a/themes/Adwaita/gtk-3.0/_common.scss
+++ b/themes/Adwaita/gtk-3.0/_common.scss
@@ -148,8 +148,25 @@ GtkGrid:insensitive {
 .entry {
   padding: 4px;
   color: $theme_fg_color;
-  @include draw_entry($borders, $theme_base_color);
+  border-radius: 3px;
   transition: all 200ms ease-out;
+  @include draw_entry(null,null);
+  &:insensitive, &:backdrop:insensitive {
+    color: $insensitive_fg_color;
+  }
+}
+
+.linked .entry {
+  @extend .entry;
+  &:first-child {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0;
+    border-right-width: 0;
+  }
+  &:last-child {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+  }
 }
 
 /***********
@@ -184,3 +201,16 @@ GtkGrid:insensitive {
     @include draw_button(null,$fill);
   }
 }
+
+.linked .button {
+  @extend .button;
+  &:first-child {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0;
+    border-right-width: 0;
+  }
+  &:last-child {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+  }
+}
diff --git a/themes/Adwaita/gtk-3.0/_drawing.scss b/themes/Adwaita/gtk-3.0/_drawing.scss
index d557f31..d78837a 100644
--- a/themes/Adwaita/gtk-3.0/_drawing.scss
+++ b/themes/Adwaita/gtk-3.0/_drawing.scss
@@ -1,15 +1,16 @@
 // Drawing mixins
 
 @mixin draw_entry($border,$fill) {
-  @if length($border) == 0 {
-    $border: $borders;
-  }
-  @if length($fill) == 0 {
-    $border: $theme_base_color;
-  }  
+  $border: $borders !default;
+  $fill: linear-gradient(to bottom,
+                                      darken($theme_base_color,20%) 1%,
+                                      darken($theme_base_color,2%) 40%,
+                                      $theme_base_color
+                                      ) !default;
+
   border: 1px solid $border;
-  background-image: none;
-  background-color: $fill;
+  background-image: $fill;
+  background-color: transparent;
 }
 
 @mixin draw_button($border,$fill) {
diff --git a/themes/Adwaita/gtk-3.0/gtk-dark.css b/themes/Adwaita/gtk-3.0/gtk-dark.css
index c53527a..878f848 100644
--- a/themes/Adwaita/gtk-3.0/gtk-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-dark.css
@@ -154,18 +154,29 @@ GtkGrid:insensitive {
 /****************
  * Text Entries *
  ****************/
-.entry {
+.entry, .linked .entry {
   padding: 4px;
   color: #eeeeec;
+  border-radius: 3px;
+  transition: all 200ms ease-out;
   border: 1px solid black;
-  background-image: none;
-  background-color: #333333;
-  transition: all 200ms ease-out; }
+  background-image: linear-gradient(to bottom, black 1%, #2e2e2e 40%, #333333);
+  background-color: transparent; }
+  .entry:insensitive, .entry:backdrop:insensitive {
+    color: white; }
+
+.linked .entry:first-child {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+  border-right-width: 0; }
+.linked .entry:last-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0; }
 
 /***********
  * Buttons *
  ***********/
-.button,
+.button, .linked .button,
 .toolbar .button.raised,
 .toolbar .raised .button,
 .toolbar GtkComboBox .button,
@@ -204,3 +215,11 @@ GtkGrid:insensitive {
     border: 1px solid black;
     background-image: linear-gradient(to bottom, transparent);
     background-color: transparent; }
+
+.linked .button:first-child {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+  border-right-width: 0; }
+.linked .button:last-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0; }
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 20b7fb5..5e6c858 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -57,7 +57,7 @@ debug {
 
 *:insensitive {
   background-color: white;
-  color: #17191a;
+  color: #748489;
   border-color: #bababa; }
 
 *:insensitive:backdrop {
@@ -90,7 +90,7 @@ debug {
 
 .gtkstyle-fallback:insensitive {
   background-color: white;
-  color: #17191a; }
+  color: #748489; }
 
 .gtkstyle-fallback:selected {
   background-color: #4a90d9;
@@ -154,18 +154,29 @@ GtkGrid:insensitive {
 /****************
  * Text Entries *
  ****************/
-.entry {
+.entry, .linked .entry {
   padding: 4px;
   color: #2e3436;
+  border-radius: 3px;
+  transition: all 200ms ease-out;
   border: 1px solid #a1a1a1;
-  background-image: none;
-  background-color: white;
-  transition: all 200ms ease-out; }
+  background-image: linear-gradient(to bottom, #cccccc 1%, #fafafa 40%, white);
+  background-color: transparent; }
+  .entry:insensitive, .entry:backdrop:insensitive {
+    color: #748489; }
+
+.linked .entry:first-child {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+  border-right-width: 0; }
+.linked .entry:last-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0; }
 
 /***********
  * Buttons *
  ***********/
-.button,
+.button, .linked .button,
 .toolbar .button.raised,
 .toolbar .raised .button,
 .toolbar GtkComboBox .button,
@@ -200,7 +211,15 @@ GtkGrid:insensitive {
   .toolbar GtkComboBox .button:backdrop:insensitive,
   .spinbutton.vertical .button:insensitive,
   .spinbutton.vertical .button:backdrop:insensitive {
-    color: #17191a;
+    color: #748489;
     border: 1px solid #a1a1a1;
     background-image: linear-gradient(to bottom, transparent);
     background-color: transparent; }
+
+.linked .button:first-child {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+  border-right-width: 0; }
+.linked .button:last-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0; }
diff --git a/themes/Adwaita/gtk-3.0/gtk.scss b/themes/Adwaita/gtk-3.0/gtk.scss
index 3a4b017..4e99a96 100644
--- a/themes/Adwaita/gtk-3.0/gtk.scss
+++ b/themes/Adwaita/gtk-3.0/gtk.scss
@@ -19,7 +19,7 @@ $warning_color: #f57900;
 $error_color: #cc0000;
 $success_color: $theme_selected_bg_color;
 
-$insensitive_fg_color: darken($theme_fg_color, 10%);
+$insensitive_fg_color: lighten($theme_fg_color, 30%);
 $insensitive_bg_color: lighten($theme_bg_color, 10%);
 
 // common drawing routines


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