summaryrefslogtreecommitdiffstats
path: root/generic/tkScale.h
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-03-31 13:56:51 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-03-31 13:56:51 (GMT)
commitaede5d4ff5faad110cd46b702d203f7337f2c3b7 (patch)
tree7a1845292fb144a5953ed675e53dc7a968c4586b /generic/tkScale.h
parent8d6184fb635d65ffb5cc86154a52e4ef8bdd528b (diff)
parent3b936e0067e5f4ced677fdc4cbfc4a2cdb42ea79 (diff)
downloadtk-aede5d4ff5faad110cd46b702d203f7337f2c3b7.zip
tk-aede5d4ff5faad110cd46b702d203f7337f2c3b7.tar.gz
tk-aede5d4ff5faad110cd46b702d203f7337f2c3b7.tar.bz2
Fix [c9887a1fc9]: Trailing zeros on scale widget ticks. The fix was subject of TIP #535 which was accepted through TCT vote.
Diffstat (limited to 'generic/tkScale.h')
-rw-r--r--generic/tkScale.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkScale.h b/generic/tkScale.h
index 296620d..4e4a3e7 100644
--- a/generic/tkScale.h
+++ b/generic/tkScale.h
@@ -73,8 +73,10 @@ typedef struct TkScale {
* values. 0 means we get to choose the number
* based on resolution and/or the range of the
* scale. */
- char format[16]; /* Sprintf conversion specifier computed from
+ char valueFormat[16]; /* Sprintf conversion specifier computed from
* digits and other information. */
+ char tickFormat[16]; /* Sprintf conversion specifier computed from
+ * tick interval. */
double bigIncrement; /* Amount to use for large increments to scale
* value. (0 means we pick a value). */
char *command; /* Command prefix to use when invoking Tcl
@@ -215,6 +217,14 @@ typedef struct TkScale {
#define SPACING 2
/*
+ * The tick values are all displayed with the same number of decimal places.
+ * This number of decimal places is such that the displayed values are all
+ * accurate to within the following proportion of a tick interval.
+ */
+
+#define TICK_VALUES_DISPLAY_ACCURACY 0.2
+
+/*
* Declaration of procedures used in the implementation of the scale widget.
*/