diff options
author | fvogel <fvogelnew1@free.fr> | 2019-03-31 13:56:51 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-03-31 13:56:51 (GMT) |
commit | aede5d4ff5faad110cd46b702d203f7337f2c3b7 (patch) | |
tree | 7a1845292fb144a5953ed675e53dc7a968c4586b /generic/tkScale.h | |
parent | 8d6184fb635d65ffb5cc86154a52e4ef8bdd528b (diff) | |
parent | 3b936e0067e5f4ced677fdc4cbfc4a2cdb42ea79 (diff) | |
download | tk-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.h | 12 |
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. */ |