Commit 9cf225c9 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

improved the calculation of the minimum size of the entry.

2007-10-17  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppropwidgets.c (gimp_prop_size_entry_new):
	improved the calculation of the minimum size of the entry.

svn path=/trunk/; revision=23856
parent 5e9914ec
2007-10-17 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppropwidgets.c (gimp_prop_size_entry_new):
improved the calculation of the minimum size of the entry.
2007-10-17 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppropwidgets.c: formatting.
......@@ -2639,6 +2639,7 @@ gimp_prop_size_entry_new (GObject *config,
gdouble value;
gdouble lower;
gdouble upper;
gint characters;
GimpUnit unit_value;
param_spec = find_param_spec (config, property_name, G_STRFUNC);
......@@ -2682,10 +2683,14 @@ gimp_prop_size_entry_new (GObject *config,
show_percent = FALSE;
}
characters = log (MAX (fabs (lower), fabs (upper))) / log (10);
if (lower < 0.0)
characters += 1;
entry = gimp_size_entry_new (1, unit_value, unit_format,
show_pixels, show_percent, FALSE,
ceil (log (upper) / log (10) + 2),
update_policy);
characters, update_policy);
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 4);
set_param_spec (NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment