summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2018-10-27 15:23:42 +0000
committerEduard Braun <eduard.braun2@gmx.de>2018-10-27 15:23:42 +0000
commitb9fb284b8fb8065b4c5d2cf67e2f31efdfaceb38 (patch)
tree2912c2b7a2ff0f311f1fff734c2b039ce73fec88 /src/ui
parentGive <svg> element useful ID names. (diff)
downloadinkscape-b9fb284b8fb8065b4c5d2cf67e2f31efdfaceb38.tar.gz
inkscape-b9fb284b8fb8065b4c5d2cf67e2f31efdfaceb38.zip
SelectedStyle: Ensure constant field width of stroke width
%g omits trailing zeroes, %#g does not but adds trailing commas...
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widget/selected-style.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 216b2688b..0fc19e282 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -1096,7 +1096,10 @@ SelectedStyle::update()
current_stroke_width = w;
{
- gchar *str = g_strdup_printf(" %.3g", w);
+ gchar *str = g_strdup_printf(" %#.3g", w);
+ if (str[strlen(str)-1] == ',') {
+ str[strlen(str)-1] = '\0';
+ }
_stroke_width.set_markup(str);
g_free (str);
}