Fix check/radio indicator drawing mess (bug #452225):
2007-07-27 Michael Natterer <mitch@imendio.com> Fix check/radio indicator drawing mess (bug #452225): * gtk/gtkstyle.c (gtk_default_draw_check): really decrease the indicator size by one to ensure odd size (don't say -= -1). * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render): removed -1 adjustment from calls to gtk_paint_option(). Theme engines now get the actually configured size passed, not one pixel less. * gtk/gtkcellrenderertoggle.c * gtk/gtkcheckmenuitem.c: changed default indicator size from 12 to 13 so all widgets which draw check/option indicators have the same default size now (and render the same size after above changes). * README.in: mention above changes in the release notes. svn path=/trunk/; revision=18547
This commit is contained in:

committed by
Michael Natterer

parent
c919e2183d
commit
3c9a4ac633
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
2007-07-27 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Fix check/radio indicator drawing mess (bug #452225):
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_check): really decrease the
|
||||
indicator size by one to ensure odd size (don't say -= -1).
|
||||
|
||||
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
|
||||
removed -1 adjustment from calls to gtk_paint_option(). Theme
|
||||
engines now get the actually configured size passed, not one pixel
|
||||
less.
|
||||
|
||||
* gtk/gtkcellrenderertoggle.c
|
||||
* gtk/gtkcheckmenuitem.c: changed default indicator size from 12
|
||||
to 13 so all widgets which draw check/option indicators have the
|
||||
same default size now (and render the same size after above
|
||||
changes).
|
||||
|
||||
* README.in: mention above changes in the release notes.
|
||||
|
||||
2007-07-27 Wouter Bolsterlee <wbolster@svn.gnome.org>
|
||||
|
||||
* Makefile.am: Include ChangeLog.pre-2-10 in tarballs as
|
||||
|
13
README.in
13
README.in
@ -117,6 +117,19 @@ Release notes for 2.12
|
||||
* gtk_menu_item_remove_submenu() has been deprecated in favour of
|
||||
gtk_menu_item_set_submenu (..., NULL).
|
||||
|
||||
* gtk_default_draw_check() has been fixed to really decrease the
|
||||
indicator size by one pixel to ensure an odd size instead of
|
||||
accidentially increasing it.
|
||||
Consequently, gtk_cell_renderer_toggle_render() could be fixed to
|
||||
not subtract 1 from the size passed to gtk_paint_option(), which
|
||||
was just a workaround for above off-by-two for even sizes (theme
|
||||
engines now get the real indicator size passed).
|
||||
The default toggle size of GtkCheckMenuItem and GtkCellRendererToggle
|
||||
has been changed to 13 to be consistent with GtkCheckButton.
|
||||
The only visible change with default settings is that the indicator in
|
||||
GtkCellRendererToggle has changed its size from 11 to 13 and is now
|
||||
consistent with menus and toggle buttons.
|
||||
|
||||
|
||||
Release notes for 2.10
|
||||
======================
|
||||
|
@ -71,7 +71,7 @@ enum {
|
||||
PROP_INDICATOR_SIZE
|
||||
};
|
||||
|
||||
#define TOGGLE_WIDTH 12
|
||||
#define TOGGLE_WIDTH 13
|
||||
|
||||
static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
@ -376,7 +376,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
|
||||
expose_area, widget, "cellradio",
|
||||
cell_area->x + x_offset + cell->xpad,
|
||||
cell_area->y + y_offset + cell->ypad,
|
||||
width - 1, height - 1);
|
||||
width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -386,7 +386,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
|
||||
expose_area, widget, "cellcheck",
|
||||
cell_area->x + x_offset + cell->xpad,
|
||||
cell_area->y + y_offset + cell->ypad,
|
||||
width - 1, height - 1);
|
||||
width, height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
|
||||
P_("Size of check or radio indicator"),
|
||||
0,
|
||||
G_MAXINT,
|
||||
12,
|
||||
13,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
widget_class->expose_event = gtk_check_menu_item_expose;
|
||||
|
@ -3645,7 +3645,7 @@ gtk_default_draw_check (GtkStyle *style,
|
||||
|
||||
exterior_size = MIN (width, height);
|
||||
if (exterior_size % 2 == 0) /* Ensure odd */
|
||||
exterior_size -= -1;
|
||||
exterior_size -= 1;
|
||||
|
||||
pad = style->xthickness + MAX (1, (exterior_size - 2 * style->xthickness) / 9);
|
||||
interior_size = MAX (1, exterior_size - 2 * pad);
|
||||
@ -3768,7 +3768,7 @@ gtk_default_draw_option (GtkStyle *style,
|
||||
|
||||
exterior_size = MIN (width, height);
|
||||
if (exterior_size % 2 == 0) /* Ensure odd */
|
||||
exterior_size -= -1;
|
||||
exterior_size -= 1;
|
||||
|
||||
x -= (1 + exterior_size - width) / 2;
|
||||
y -= (1 + exterior_size - height) / 2;
|
||||
|
Reference in New Issue
Block a user