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



commit 046fcba5f81c94e508385b58886c0367c4c7eaa1
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                   |    3 --
 gtk/theme/Adwaita/gtk-contained-dark.css         |    5 +--
 gtk/theme/Adwaita/gtk-contained.css              |    5 +--
 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, 35 insertions(+), 29 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 05b083d..3d768ef 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -519,6 +519,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"),
@@ -526,7 +534,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"),
@@ -534,7 +550,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"),
@@ -542,12 +566,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",
@@ -556,7 +583,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 48344c1..94e8862 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2014,13 +2014,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;
@@ -2491,7 +2489,6 @@ treeview.view radio {
 scale {
   -GtkScale-slider-length: 22;
   -GtkRange-slider-width: 30;
-  -GtkRange-trough-border: 2;
 
   outline-offset: -10px;
   -gtk-outline-radius: 7px;
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 05497bb..be47b5d 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2226,11 +2226,9 @@ notebook > stack:not(:only-child) {
  **************/
 * {
   -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.up {
@@ -2653,7 +2651,6 @@ 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 {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 8f95f2e..b8c6b2e 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2236,11 +2236,9 @@ notebook > stack:not(:only-child) {
  **************/
 * {
   -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.up {
@@ -2684,7 +2682,6 @@ 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 {
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 df2dc9f..59cd72e 100644
--- a/gtk/theme/win32/gtk-win32-base.css
+++ b/gtk/theme/win32/gtk-win32-base.css
@@ -346,7 +346,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, 3);
 }
@@ -650,7 +649,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]