diff options
author | jal_frezie <jasper@simulistics.com> | 2019-02-20 11:51:53 (GMT) |
---|---|---|
committer | jal_frezie <jasper@simulistics.com> | 2019-02-20 11:51:53 (GMT) |
commit | 31b66a6295cd71b19bc085fd8c1b6b660c327ad3 (patch) | |
tree | ccec28e2a4f0bf9b2b484512ffd2f61838b60d94 /generic/tkScale.h | |
parent | 467268bf38ec0cab6e8c5cc66e44f6953f13b684 (diff) | |
download | tk-31b66a6295cd71b19bc085fd8c1b6b660c327ad3.zip tk-31b66a6295cd71b19bc085fd8c1b6b660c327ad3.tar.gz tk-31b66a6295cd71b19bc085fd8c1b6b660c327ad3.tar.bz2 |
Eliminate trailing zeros from scale tick values. This is done by
calculating a separate format string for these values, rather than
using the same format string as for the current value. The basis is
the same, i.e., enough digits are displayed to distinguish any pair of
adjacent tick values, and all tick values have the same number of
decimals so some may still have trailing zeros.
Code for laying out vertical scales has been adjusted to take account
of the fact that the tick column may now be narrower than the value
column.
Diffstat (limited to 'generic/tkScale.h')
-rw-r--r-- | generic/tkScale.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkScale.h b/generic/tkScale.h index d44e65b..4250b06 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 |