From b9fb284b8fb8065b4c5d2cf67e2f31efdfaceb38 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 27 Oct 2018 17:23:42 +0200 Subject: SelectedStyle: Ensure constant field width of stroke width %g omits trailing zeroes, %#g does not but adds trailing commas... --- src/ui/widget/selected-style.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui') 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); } -- cgit v1.2.3