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

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> 2005-07-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpviewrendererpalette.c * app/widgets/gimpviewrendererpalette.c
......
...@@ -545,17 +545,16 @@ gimp_palette_editor_zoom (GimpPaletteEditor *editor, ...@@ -545,17 +545,16 @@ gimp_palette_editor_zoom (GimpPaletteEditor *editor,
zoom_factor -= 0.1; zoom_factor -= 0.1;
break; 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; gint rows;
height = editor->view->parent->parent->parent->allocation.height; rows = palette->n_colors / columns;
if (palette->n_columns) if (palette->n_colors % columns)
rows = palette->n_colors / palette->n_columns; rows += 1;
else
rows = palette->n_colors / COLUMNS;
rows = MAX (1, rows); 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