Bug 372984 - Use locale units for cloth count by default
Summary: Use locale units for cloth count by default
Status: RESOLVED FIXED
Alias: None
Product: KXStitch
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Steve Allewell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-27 08:45 UTC by Karl Ove Hufthammer
Modified: 2016-12-14 21:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2016-11-27 08:45:51 UTC
By default, KXStitch uses *inches* as the unit for cloth count, even if I have set ‘Metric’ for my locale (‘System Settings → Regional Settings → Format → Measurement Units’). It would be nice if the units specified in the locale would be used by default.

In the preferences dialogue, the ‘Units’ text dropdown for ‘Cloth Count’ would have *three* possible options, ‘Default’, ‘Inches’, and ‘Centimeters’. (The latter is currently abbreviated to ‘CM’, but shouldn’t be, since ‘Inches’ is *not* abbreviated (to ‘In.’).)

It would be even better if ‘Default’ would be listed as ‘Default (centimeters)’ or ‘Default (inches)’, depending on the current system settings.
Comment 1 Steve Allewell 2016-12-09 21:06:41 UTC
In the configuration dialogue for Pattern, 'Pattern Size' units are Stitches|Inches|Centimeters and the 'Cloth Count' units are Inches|Centimetres|Default, Default will be suffixed by (Inches) or (Centimetres) depending on locale.

I will change the installed default to 'Default (Locale Setting)'

Do you think that if a user selects Inches or Centimetres in the 'Pattern Size', the 'Cloth Count' should change to suit, or should it retain a mixed measurement system?
Comment 2 Steve Allewell 2016-12-14 21:00:37 UTC
Git commit fded3b62be6377a38bab936027c4b98102f873dc by Steve Allewell.
Committed on 14/12/2016 at 20:55.
Pushed by sallewell into branch 'master'.

Fix a number of usability bugs with number formats

Change formatting of cloth count across a number of dialogs. Fix some
conversion errors between stitches/cm/inches.  Set cloth count
preference to users locale by default. Add suffixes to identify units
used.
Related: bug 372985, bug 372987

M  +23   -6    kxstitch.kcfg
M  +3    -3    kxstitchui.rc
M  +89   -46   src/ConfigurationDialogs.cpp
M  +5    -3    src/ConfigurationDialogs.h
M  +18   -14   src/Document.cpp
M  +2    -2    src/Editor.cpp
M  +1    -1    src/Editor.h
M  +7    -7    src/Element.cpp
M  +115  -59   src/FilePropertiesDlg.cpp
M  +5    -4    src/FilePropertiesDlg.h
M  +91   -15   src/ImportImageDlg.cpp
M  +7    -9    src/MainWindow.cpp
M  +1    -1    src/PatternElementDlg.cpp
M  +1    -1    src/Scale.cpp
M  +15   -15   ui/FileProperties.ui
M  +3    -0    ui/ImportImage.ui
M  +7    -2    ui/PatternConfigPage.ui

https://commits.kde.org/kxstitch/fded3b62be6377a38bab936027c4b98102f873dc