[gtk+] Adwaita: more usefull headerbar related functions



commit 4570806ad6a3ec7d501058000bac179a6d06ce05
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Sep 3 19:41:50 2014 +0200

    Adwaita: more usefull headerbar related functions

 gtk/resources/theme/Adwaita/_drawing.scss          |   36 ++++++++++++--------
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |    2 +-
 gtk/resources/theme/Adwaita/gtk-contained.css      |    2 +-
 3 files changed, 24 insertions(+), 16 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_drawing.scss b/gtk/resources/theme/Adwaita/_drawing.scss
index 1ee03d9..371af4a 100644
--- a/gtk/resources/theme/Adwaita/_drawing.scss
+++ b/gtk/resources/theme/Adwaita/_drawing.scss
@@ -3,7 +3,7 @@
 // generic drawing of more complex things
 
 @function _widget_edge($c:$borders_edge) {
-  // outer highlight "used" on most widgets
+// outer highlight "used" on most widgets
   @return 0 1px $c;
 }
 
@@ -94,8 +94,9 @@
 
 // buttons
 
- function _border_color ($c) { @return darken($c,25%); } // colored buttons want the
-                                                         // border form the base color
+ function _border_color ($c) { @return darken($c,25%); } // colored buttons want
+                                                         // the border form the
+                                                         // base color
 
 @function _text_shadow_color ($tc:$fg_color, $bg:$bg_color) {
 //
@@ -407,19 +408,26 @@
                                              lighten($selected_bg_color,6%));
 }
 
- function headerbar_gradient($c) {
-  @return linear-gradient(to bottom, lighten($c,4%), $c);
+ function headerbar_gradient($c, $tc:lighten($c,4%)) {
+//
+// headerbar gradient helper function
+//
+// $c:  base color
+// $tc: top color
+//
+  @return linear-gradient(to bottom, $tc, $c);
 }
 
- mixin headerbar_fill($c:$bg_color, $hc:$top_hilight) {
-  //
-  // headerbar fill
-  //
-  // $c:  base color
-  // $hc: top highlight color
-  // 
-  background-image: headerbar_gradient($c);
-  box-shadow: inset 0 -1px mix($borders_color, $c, 30%), // bottom shade
+ mixin headerbar_fill($c:$bg_color, $tc:lighten($c,4%), $hc:$top_hilight) {
+//
+// headerbar fill
+//
+// $c:  base color
+// $tc: top color
+// $hc: top highlight color
+// 
+  background-image: headerbar_gradient($c, $tc);
+  box-shadow: inset 0 -1px mix(_border_color($c), $c, 30%), // bottom shade
               inset 0 1px $hc; // top highlight
 
 }
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index aae82b4..29cf305 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1179,7 +1179,7 @@ GtkComboBox {
   border-radius: 7px 7px 0 0;
   background-color: transparent;
   background-image: linear-gradient(to bottom, #434a4a, #393f3f);
-  box-shadow: inset 0 -1px #303535, inset 0 1px rgba(238, 238, 236, 0.1); }
+  box-shadow: inset 0 -1px #272c2c, inset 0 1px rgba(238, 238, 236, 0.1); }
   .titlebar:backdrop, GtkCalendar.header:backdrop,
   .header-bar:backdrop {
     border-color: #1e2222;
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index b78b48c..0f46d95 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1171,7 +1171,7 @@ GtkComboBox {
   border-radius: 7px 7px 0 0;
   background-color: transparent;
   background-image: linear-gradient(to bottom, #f7f7f7, #ededed);
-  box-shadow: inset 0 -1px #d6d6d6, inset 0 1px white; }
+  box-shadow: inset 0 -1px #d9d9d9, inset 0 1px white; }
   .titlebar:backdrop, GtkCalendar.header:backdrop,
   .header-bar:backdrop {
     border-color: #a8a8a8;


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