[gtk+] Adwaita: progressbar sizing and progress component positioning



commit 124923213f0da25fb3bb8e48111ff0f223dbd0a4
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon Dec 21 11:28:45 2015 +0100

    Adwaita: progressbar sizing and progress component positioning
    
    shrinked progressbars a bit and moved the progress component start
    and end over the trough border.

 gtk/theme/Adwaita/_common.scss           |   16 +++++++++++++++-
 gtk/theme/Adwaita/gtk-contained-dark.css |   11 ++++++++++-
 gtk/theme/Adwaita/gtk-contained.css      |   11 ++++++++++-
 3 files changed, 35 insertions(+), 3 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index d841b7a..76ee270 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2398,8 +2398,22 @@ scale {
  *****************/
 
 progressbar {
+  // sizing
+  &.horizontal {
+    trough,
+    progress { min-height: 4px; } // FIXME: should be 6px, but looks like currently gtk+ consider borders
+  }
+
+  &.vertical {
+    trough,
+    progress { min-width: 4px; } // FIXME: should be 6px, but looks like currently gtk+ consider borders
+  }
+
+  &.horizontal progress { margin: 0 -1px; } // the progress node is positioned after the trough border
+  &.vertical progress { margin: -1px 0; }   // this moves it over it.
+
+
   // FIXME: insensitive state missing and some other state should be set probably
-  padding: 0;
   font-size: smaller;
   color: transparentize($fg_color, 0.6);
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 149d7f6..8bf804e 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3419,10 +3419,19 @@ scale {
  * Progress bars *
  *****************/
 progressbar {
-  padding: 0;
   font-size: smaller;
   color: rgba(238, 238, 236, 0.4);
   box-shadow: 0 1px rgba(238, 238, 236, 0); }
+  progressbar.horizontal trough,
+  progressbar.horizontal progress {
+    min-height: 4px; }
+  progressbar.vertical trough,
+  progressbar.vertical progress {
+    min-width: 4px; }
+  progressbar.horizontal progress {
+    margin: 0 -1px; }
+  progressbar.vertical progress {
+    margin: -1px 0; }
   progressbar:backdrop {
     box-shadow: none; }
   progressbar progress {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 6d01258..7e1141a 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3581,10 +3581,19 @@ scale {
  * Progress bars *
  *****************/
 progressbar {
-  padding: 0;
   font-size: smaller;
   color: rgba(46, 52, 54, 0.4);
   box-shadow: 0 1px rgba(255, 255, 255, 0); }
+  progressbar.horizontal trough,
+  progressbar.horizontal progress {
+    min-height: 4px; }
+  progressbar.vertical trough,
+  progressbar.vertical progress {
+    min-width: 4px; }
+  progressbar.horizontal progress {
+    margin: 0 -1px; }
+  progressbar.vertical progress {
+    margin: -1px 0; }
   progressbar:backdrop {
     box-shadow: none; }
   progressbar progress {


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