[gtk+/gtk-2-24] Scale: Explain how to round value when !draw-value
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Scale: Explain how to round value when !draw-value
- Date: Tue, 2 May 2017 11:38:27 +0000 (UTC)
commit 94929bc0e0bdf1c95736790a7ce3bccea393ee83
Author: Daniel Boles <dboles src gnome org>
Date: Tue May 2 12:36:05 2017 +0100
Scale: Explain how to round value when !draw-value
Scale:digits is (now, again) ineffective if Scale:draw-value is FALSE.
To get rounding in that case, the base Range:round-digits must be used.
gtk/gtkscale.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 0e27f29..4317523 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -597,9 +597,11 @@ gtk_scale_new_with_range (GtkOrientation orientation,
* e.g. use 1 to display 1.0, 2 to display 1.00, etc
*
* Sets the number of decimal places that are displayed in the value. Also
- * causes the value of the adjustment to be rounded to this number of digits
- * whenever it is changed, so the retrieved value matches the displayed one, if
- * #GtkScale:draw-value is TRUE at the time of the change.
+ * causes the value of the adjustment to be rounded to this number of digits,
+ * so the retrieved value matches the displayed one, if #GtkScale:draw-value is
+ * %TRUE when the value changes. If you want to enforce rounding the value when
+ * #GtkScale:draw-value is %FALSE, you can set #GtkRange:round-digits instead.
+ *
*/
void
gtk_scale_set_digits (GtkScale *scale,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]