[gtk+/wip/cosimoc/range-gadget: 27/28] range: deprecate more style properties



commit d4c8efe1a68d88243efc1509c5abab7932a49149
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Feb 21 00:33:36 2016 -0800

    range: deprecate more style properties
    
    These are never read now.

 gtk/gtkrange.c                                   |   35 +++++++++++++++++++--
 gtk/theme/Adwaita/_common.scss                   |   25 +++++++++------
 gtk/theme/Adwaita/gtk-contained-dark.css         |   28 +++++++++---------
 gtk/theme/Adwaita/gtk-contained.css              |   28 +++++++++---------
 gtk/theme/HighContrast/_common.scss              |    4 --
 gtk/theme/HighContrast/gtk-contained-inverse.css |    5 +--
 gtk/theme/HighContrast/gtk-contained.css         |    5 +--
 gtk/theme/win32/gtk-win32-base.css               |    2 -
 8 files changed, 76 insertions(+), 56 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 13cf7a2..4a71013 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -521,6 +521,14 @@ gtk_range_class_init (GtkRangeClass *class)
 
   g_object_class_install_properties (gobject_class, LAST_PROP, properties);
 
+  /**
+   * GtkRange:slider-width:
+   *
+   * Width of scrollbar or scale thumb.
+   *
+   * Depreacated: 3.20: Use the min-height/min-width CSS properties on the
+   *   slider element. The value of this style property is ignored.
+   */
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_int ("slider-width",
                                                             P_("Slider Width"),
@@ -528,7 +536,15 @@ gtk_range_class_init (GtkRangeClass *class)
                                                             0,
                                                             G_MAXINT,
                                                             14,
-                                                            GTK_PARAM_READABLE));
+                                                            GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
+  /**
+   * GtkRange:trough-border:
+   *
+   * Spacing between thumb/steppers and outer trough bevel.
+   *
+   * Depreacated: 3.20: Use the margin/padding CSS properties on the through and
+   *   stepper elements. The value of this style property is ignored.
+   */
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_int ("trough-border",
                                                              P_("Trough Border"),
@@ -536,7 +552,15 @@ gtk_range_class_init (GtkRangeClass *class)
                                                              0,
                                                              G_MAXINT,
                                                              1,
-                                                             GTK_PARAM_READABLE));
+                                                             GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
+  /**
+   * GtkRange:stepper-size:
+   *
+   * Length of step buttons at ends.
+   *
+   * Depreacated: 3.20: Use the min-height/min-width CSS properties on the
+   *   stepper elements. The value of this style property is ignored.
+   */
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_int ("stepper-size",
                                                             P_("Stepper Size"),
@@ -544,12 +568,15 @@ gtk_range_class_init (GtkRangeClass *class)
                                                             0,
                                                             G_MAXINT,
                                                             14,
-                                                            GTK_PARAM_READABLE));
+                                                            GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
   /**
    * GtkRange:stepper-spacing:
    *
    * The spacing between the stepper buttons and thumb. Note that
    * stepper-spacing won't have any effect if there are no steppers.
+   *
+   * Depreacated: 3.20: Use the margin CSS property on the stepper elements.
+   *   The value of this style property is ignored.
    */
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_int ("stepper-spacing",
@@ -558,7 +585,7 @@ gtk_range_class_init (GtkRangeClass *class)
                                                              0,
                                                             G_MAXINT,
                                                             0,
-                                                            GTK_PARAM_READABLE));
+                                                            GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
 
   /**
    * GtkRange:arrow-displacement-x:
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 475d098..d3d59ae 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2013,14 +2013,11 @@ notebook {
  **************/
 scrollbar {
   @at-root * {
-    -GtkRange-slider-width: 13;
-    -GtkRange-trough-border: 0;
     -GtkScrollbar-has-backward-stepper: false;
     -GtkScrollbar-has-forward-stepper: false;
     -GtkScrollbar-min-slider-length: 42; // minimum size for the slider.
                                          // sadly can't be in '.slider'
                                          // where it belongs
-    -GtkRange-stepper-spacing: 0;
   }
 
   $_slider_margin: 3px;
@@ -2050,8 +2047,6 @@ scrollbar {
     &:not(.dragging):not(.hovering) { // Overlay scrolling indicator
       opacity: 0.4;
 
-      -GtkRange-slider-width: 5px;
-
       slider {
         margin: 0;
         background-color: $fg_color;
@@ -2068,11 +2063,13 @@ scrollbar {
       &.vertical slider {
         margin-top: $_slider_margin - 1px;
         margin-bottom: $_slider_margin - 1px;
+        min-width: 5px;
       }
 
       &.horizontal slider {
         margin-left: $_slider_margin - 1px;
         margin-right: $_slider_margin - 1px;
+        min-height: 5px;
       }
     }
 
@@ -2116,6 +2113,7 @@ scrollbar {
   &.vertical {
     slider {
       margin-left: 1px + $_slider_margin;
+      min-width: 6px;
 
       &:dir(rtl) {
         margin-left: $_slider_margin;
@@ -2143,7 +2141,10 @@ scrollbar {
   }
 
   &.horizontal {
-    slider { margin-top: 1px + $_slider_margin; }
+    slider {
+      margin-top: 1px + $_slider_margin;
+      min-height: 6px;
+    }
 
     &.fine-tune slider { margin-top: 1px + $_slider_fine_tune_margin; }
 
@@ -2490,20 +2491,24 @@ treeview.view radio {
 
 scale {
   -GtkScale-slider-length: 22;
-  -GtkRange-slider-width: 30;
-  -GtkRange-trough-border: 2;
 
   outline-offset: -10px;
   -gtk-outline-radius: 7px;
 
   &.horizontal {
     trough { margin: 15px 12px; }
-    slider { margin: 5px 1px; }
+    slider {
+      margin: 5px 1px;
+      min-height: 22px;
+    }
   }
 
   &.vertical {
     trough { margin: 12px 15px; }
-    slider { margin: 1px 5px; }
+    slider {
+      margin: 1px 5px;
+      min-width: 22px;
+    }
   }
 
   &.fine-tune {
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 5113c28..30cbb25 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2225,12 +2225,9 @@ notebook > stack:not(:only-child) {
  * Scrollbars *
  **************/
 * {
-  -GtkRange-slider-width: 13;
-  -GtkRange-trough-border: 0;
   -GtkScrollbar-has-backward-stepper: false;
   -GtkScrollbar-has-forward-stepper: false;
-  -GtkScrollbar-min-slider-length: 42;
-  -GtkRange-stepper-spacing: 0; }
+  -GtkScrollbar-min-slider-length: 42; }
 scrollbar button {
   border: none; }
 scrollbar.vertical button.down {
@@ -2242,8 +2239,7 @@ scrollbar.horizontal button.down {
 scrollbar.horizontal button.up {
   -gtk-icon-source: -gtk-icontheme("pan-left-symbolic"); }
 scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
-  opacity: 0.4;
-  -GtkRange-slider-width: 5px; }
+  opacity: 0.4; }
   scrollbar.overlay-indicator:not(.dragging):not(.hovering) slider {
     margin: 0;
     background-color: #eeeeec;
@@ -2254,10 +2250,12 @@ scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
     background-color: transparent; }
   scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical slider {
     margin-top: 2px;
-    margin-bottom: 2px; }
+    margin-bottom: 2px;
+    min-width: 5px; }
   scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal slider {
     margin-left: 2px;
-    margin-right: 2px; }
+    margin-right: 2px;
+    min-height: 5px; }
 scrollbar.overlay-indicator.dragging, scrollbar.overlay-indicator.hovering {
   opacity: 0.7; }
 scrollbar trough {
@@ -2282,7 +2280,8 @@ scrollbar slider {
 scrollbar.fine-tune slider {
   margin: 4px; }
 scrollbar.vertical slider {
-  margin-left: 4px; }
+  margin-left: 4px;
+  min-width: 6px; }
   scrollbar.vertical slider:dir(rtl) {
     margin-left: 3px;
     margin-right: 4px; }
@@ -2297,7 +2296,8 @@ scrollbar.vertical trough {
     border-left-style: none;
     border-right-style: solid; }
 scrollbar.horizontal slider {
-  margin-top: 4px; }
+  margin-top: 4px;
+  min-height: 6px; }
 scrollbar.horizontal.fine-tune slider {
   margin-top: 5px; }
 scrollbar.horizontal trough {
@@ -2652,18 +2652,18 @@ scale highlight, progressbar progress {
 
 scale {
   -GtkScale-slider-length: 22;
-  -GtkRange-slider-width: 30;
-  -GtkRange-trough-border: 2;
   outline-offset: -10px;
   -gtk-outline-radius: 7px; }
   scale.horizontal trough {
     margin: 15px 12px; }
   scale.horizontal slider {
-    margin: 5px 1px; }
+    margin: 5px 1px;
+    min-height: 22px; }
   scale.vertical trough {
     margin: 12px 15px; }
   scale.vertical slider {
-    margin: 1px 5px; }
+    margin: 1px 5px;
+    min-width: 22px; }
   scale.fine-tune {
     outline-offset: -8px;
     -gtk-outline-radius: 10px; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index a626cf0..2b14aa1 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2235,12 +2235,9 @@ notebook > stack:not(:only-child) {
  * Scrollbars *
  **************/
 * {
-  -GtkRange-slider-width: 13;
-  -GtkRange-trough-border: 0;
   -GtkScrollbar-has-backward-stepper: false;
   -GtkScrollbar-has-forward-stepper: false;
-  -GtkScrollbar-min-slider-length: 42;
-  -GtkRange-stepper-spacing: 0; }
+  -GtkScrollbar-min-slider-length: 42; }
 scrollbar button {
   border: none; }
 scrollbar.vertical button.down {
@@ -2252,8 +2249,7 @@ scrollbar.horizontal button.down {
 scrollbar.horizontal button.up {
   -gtk-icon-source: -gtk-icontheme("pan-left-symbolic"); }
 scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
-  opacity: 0.4;
-  -GtkRange-slider-width: 5px; }
+  opacity: 0.4; }
   scrollbar.overlay-indicator:not(.dragging):not(.hovering) slider {
     margin: 0;
     background-color: #2e3436;
@@ -2264,10 +2260,12 @@ scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
     background-color: transparent; }
   scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical slider {
     margin-top: 2px;
-    margin-bottom: 2px; }
+    margin-bottom: 2px;
+    min-width: 5px; }
   scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal slider {
     margin-left: 2px;
-    margin-right: 2px; }
+    margin-right: 2px;
+    min-height: 5px; }
 scrollbar.overlay-indicator.dragging, scrollbar.overlay-indicator.hovering {
   opacity: 0.7; }
 scrollbar trough {
@@ -2292,7 +2290,8 @@ scrollbar slider {
 scrollbar.fine-tune slider {
   margin: 4px; }
 scrollbar.vertical slider {
-  margin-left: 4px; }
+  margin-left: 4px;
+  min-width: 6px; }
   scrollbar.vertical slider:dir(rtl) {
     margin-left: 3px;
     margin-right: 4px; }
@@ -2307,7 +2306,8 @@ scrollbar.vertical trough {
     border-left-style: none;
     border-right-style: solid; }
 scrollbar.horizontal slider {
-  margin-top: 4px; }
+  margin-top: 4px;
+  min-height: 6px; }
 scrollbar.horizontal.fine-tune slider {
   margin-top: 5px; }
 scrollbar.horizontal trough {
@@ -2683,18 +2683,18 @@ scale highlight, progressbar progress {
 
 scale {
   -GtkScale-slider-length: 22;
-  -GtkRange-slider-width: 30;
-  -GtkRange-trough-border: 2;
   outline-offset: -10px;
   -gtk-outline-radius: 7px; }
   scale.horizontal trough {
     margin: 15px 12px; }
   scale.horizontal slider {
-    margin: 5px 1px; }
+    margin: 5px 1px;
+    min-height: 22px; }
   scale.vertical trough {
     margin: 12px 15px; }
   scale.vertical slider {
-    margin: 1px 5px; }
+    margin: 1px 5px;
+    min-width: 22px; }
   scale.fine-tune {
     outline-offset: -8px;
     -gtk-outline-radius: 10px; }
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index 523577a..f9359c8 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -1458,7 +1458,6 @@ scrollbar {
   background-clip: padding-box;
   background-image: none;
   border-style: solid;
-  -GtkRange-trough-border: 0;
   -GtkScrollbar-has-backward-stepper: false;
   -GtkScrollbar-has-forward-stepper: false;
   -GtkRange-slider-width: 20;
@@ -1466,8 +1465,6 @@ scrollbar {
                                        // sadly can't be in '.slider'
                                        // where it belongs
 
-  -GtkRange-stepper-spacing: 0;
-
   trough { @extend junction; }
 
   $_slider_margin: 3px;
@@ -1664,7 +1661,6 @@ scale.scale-has-marks-above.scale-has-marks-below,
 scale.vertical.scale-has-marks-above.scale-has-marks-below {
   -GtkScale-slider-length: 20;
   -GtkRange-slider-width: 20;
-  -GtkRange-trough-border: 2;
   outline-offset: -9px;
   -gtk-outline-radius: 4px;
 
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css 
b/gtk/theme/HighContrast/gtk-contained-inverse.css
index e010605..0f26e23 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -1614,12 +1614,10 @@ scrollbar {
   background-clip: padding-box;
   background-image: none;
   border-style: solid;
-  -GtkRange-trough-border: 0;
   -GtkScrollbar-has-backward-stepper: false;
   -GtkScrollbar-has-forward-stepper: false;
   -GtkRange-slider-width: 20;
-  -GtkScrollbar-min-slider-length: 42;
-  -GtkRange-stepper-spacing: 0; }
+  -GtkScrollbar-min-slider-length: 42; }
   scrollbar button {
     border: none; }
   scrollbar slider {
@@ -1820,7 +1818,6 @@ scale.scale-has-marks-above.scale-has-marks-below,
 scale.vertical.scale-has-marks-above.scale-has-marks-below {
   -GtkScale-slider-length: 20;
   -GtkRange-slider-width: 20;
-  -GtkRange-trough-border: 2;
   outline-offset: -9px;
   -gtk-outline-radius: 4px; }
   scale.fine-tune,
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index 4d77114..7fa7992 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -1614,12 +1614,10 @@ scrollbar {
   background-clip: padding-box;
   background-image: none;
   border-style: solid;
-  -GtkRange-trough-border: 0;
   -GtkScrollbar-has-backward-stepper: false;
   -GtkScrollbar-has-forward-stepper: false;
   -GtkRange-slider-width: 20;
-  -GtkScrollbar-min-slider-length: 42;
-  -GtkRange-stepper-spacing: 0; }
+  -GtkScrollbar-min-slider-length: 42; }
   scrollbar button {
     border: none; }
   scrollbar slider {
@@ -1820,7 +1818,6 @@ scale.scale-has-marks-above.scale-has-marks-below,
 scale.vertical.scale-has-marks-above.scale-has-marks-below {
   -GtkScale-slider-length: 20;
   -GtkRange-slider-width: 20;
-  -GtkRange-trough-border: 2;
   outline-offset: -9px;
   -gtk-outline-radius: 4px; }
   scale.fine-tune,
diff --git a/gtk/theme/win32/gtk-win32-base.css b/gtk/theme/win32/gtk-win32-base.css
index 1c5026f..1454128 100644
--- a/gtk/theme/win32/gtk-win32-base.css
+++ b/gtk/theme/win32/gtk-win32-base.css
@@ -340,7 +340,6 @@ radiobutton:dir(rtl) radio {
 
 scrollbar {
     background-color: transparent;
-    -GtkRange-trough-border: 0;
     -GtkRange-arrow-scaling: 0.0;
     -GtkRange-slider-width: -gtk-win32-size(scrollbar, cyhscroll);
 }
@@ -644,7 +643,6 @@ scale {
     -GtkScale-value-spacing: 0;
     -GtkScale-slider-length: 12;
     -GtkRange-slider-width: 20;
-    -GtkRange-trough-border: 0;
 }
 
 scale trough {


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