Commit afc7754c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

fixed the GIMP_ZOOM_TO case for palettes with a number of colors that is

2005-07-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimppaletteeditor.c (gimp_palette_editor_zoom):
	fixed the GIMP_ZOOM_TO case for palettes with a number of colors
	that is not a multiple of the number of columns.
parent 222d5a89
2005-07-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimppaletteeditor.c (gimp_palette_editor_zoom):
fixed the GIMP_ZOOM_TO case for palettes with a number of colors
that is not a multiple of the number of columns.
2005-07-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpviewrendererpalette.c
......
......@@ -545,17 +545,16 @@ gimp_palette_editor_zoom (GimpPaletteEditor *editor,
zoom_factor -= 0.1;
break;
case GIMP_ZOOM_TO: /* abused as ZOOM_ALL */
case GIMP_ZOOM_TO: /* used as ZOOM_ALL */
{
gint height;
gint height = editor->view->parent->parent->parent->allocation.height;
gint columns = palette->n_columns ? palette->n_columns : COLUMNS;
gint rows;
height = editor->view->parent->parent->parent->allocation.height;
rows = palette->n_colors / columns;
if (palette->n_columns)
rows = palette->n_colors / palette->n_columns;
else
rows = palette->n_colors / COLUMNS;
if (palette->n_colors % columns)
rows += 1;
rows = MAX (1, rows);
......
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