summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--README.in13
-rw-r--r--gtk/gtkcellrenderertoggle.c6
-rw-r--r--gtk/gtkcheckmenuitem.c2
-rw-r--r--gtk/gtkstyle.c4
5 files changed, 39 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 00390a8617..862df00e3c 100644
--- a/ChangeLog
+++ b/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
diff --git a/README.in b/README.in
index cc36020115..bca64bae7b 100644
--- a/README.in
+++ b/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
======================
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index 24f45a7761..130db9f319 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -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);
}
}
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 4f631852c6..dc43231192 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -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;
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 7854778991..d841fc1c9f 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -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;