mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
222d5a8935
commit
afc7754c9e
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue