diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c index 085785192b..d4ad63e037 100644 --- a/libgimpwidgets/gimppropwidgets.c +++ b/libgimpwidgets/gimppropwidgets.c @@ -3550,7 +3550,7 @@ gimp_prop_size_entry_new (GObject *config, gdouble lower; gdouble upper; GimpUnit *unit_value; - gint scaled_resolution; + gint entry_width; param_spec = find_param_spec (config, property_name, G_STRFUNC); if (! param_spec) @@ -3593,15 +3593,13 @@ gimp_prop_size_entry_new (GObject *config, show_percent = FALSE; } - if (unit_value != gimp_unit_pixel ()) - scaled_resolution = gimp_unit_get_scaled_digits (unit_value, resolution); - else - scaled_resolution = (gint) resolution; + entry_width = gimp_prop_size_entry_num_chars (lower, upper) + 1 + + gimp_unit_get_scaled_digits (unit_value, resolution); + entry_width = MAX (entry_width, 7); entry = gimp_size_entry_new (1, unit_value, unit_format, show_pixels, show_percent, FALSE, - gimp_prop_size_entry_num_chars (lower, upper) + 1 + - scaled_resolution, update_policy); + entry_width, update_policy); set_param_spec (NULL, gimp_size_entry_get_help_widget (GIMP_SIZE_ENTRY (entry), 0),