[gtk+/wip/cosimoc/range-gadget: 25/62] range: deprecate more style properties
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cosimoc/range-gadget: 25/62] range: deprecate more style properties
- Date: Mon, 29 Feb 2016 00:06:21 +0000 (UTC)
commit 65342a1cc7a6a0725c31db058398024b79fc54b3
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 | 35 ++++++++++++++-------
gtk/theme/Adwaita/gtk-contained-dark.css | 34 +++++++++++----------
gtk/theme/Adwaita/gtk-contained.css | 34 +++++++++++----------
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, 92 insertions(+), 62 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index ca5253e..449e489 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 e163c7b..71d2a8a 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2006,14 +2006,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;
@@ -2043,8 +2040,6 @@ scrollbar {
&:not(.dragging):not(.hovering) { // Overlay scrolling indicator
opacity: 0.4;
- -GtkRange-slider-width: 5px;
-
slider {
margin: 0;
background-color: $fg_color;
@@ -2061,11 +2056,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;
}
}
@@ -2109,6 +2106,7 @@ scrollbar {
&.vertical {
slider {
margin-left: 1px + $_slider_margin;
+ min-width: 6px;
&:dir(rtl) {
margin-left: $_slider_margin;
@@ -2136,7 +2134,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; }
@@ -2483,20 +2484,30 @@ 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; }
+ trough {
+ margin: 15px 12px;
+ min-height: 3px;
+ }
+ slider {
+ margin: 5px 1px;
+ min-height: 22px;
+ }
}
&.vertical {
- trough { margin: 12px 15px; }
- slider { margin: 1px 5px; }
+ trough {
+ margin: 12px 15px;
+ min-width: 3px;
+ }
+ 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 4b5cb14..ed69259 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2219,12 +2219,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 {
@@ -2236,8 +2233,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;
@@ -2248,10 +2244,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 {
@@ -2276,7 +2274,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; }
@@ -2291,7 +2290,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 {
@@ -2646,18 +2646,20 @@ 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; }
+ margin: 15px 12px;
+ min-height: 3px; }
scale.horizontal slider {
- margin: 5px 1px; }
+ margin: 5px 1px;
+ min-height: 22px; }
scale.vertical trough {
- margin: 12px 15px; }
+ margin: 12px 15px;
+ min-width: 3px; }
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 49d0773..d11d598 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2229,12 +2229,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 {
@@ -2246,8 +2243,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;
@@ -2258,10 +2254,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 {
@@ -2286,7 +2284,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; }
@@ -2301,7 +2300,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 {
@@ -2677,18 +2677,20 @@ 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; }
+ margin: 15px 12px;
+ min-height: 3px; }
scale.horizontal slider {
- margin: 5px 1px; }
+ margin: 5px 1px;
+ min-height: 22px; }
scale.vertical trough {
- margin: 12px 15px; }
+ margin: 12px 15px;
+ min-width: 3px; }
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 7a4b311..5757b0f 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 59b5530..2b3483e 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 d3936ee..fa3f4d7 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 6cc3aa4..a017bf6 100644
--- a/gtk/theme/win32/gtk-win32-base.css
+++ b/gtk/theme/win32/gtk-win32-base.css
@@ -547,7 +547,6 @@ notebook > header > tabs > tab:only-child:checked {
scrollbar {
background-color: transparent;
- -GtkRange-trough-border: 0;
-GtkRange-arrow-scaling: 0.0;
-GtkRange-slider-width: -gtk-win32-size(scrollbar, cyhscroll);
}
@@ -865,7 +864,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]