From 6f1394ef48f3a3fd4efb06247cced9db2fdb6d54 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 14 Aug 2009 02:53:53 +0000 Subject: [PATCH] 2009-08-13 Jim Evins * src/color-combo-color-menu-item.c: (gl_color_combo_color_menu_item_init), (gl_color_combo_color_menu_item_new), (gl_color_combo_color_menu_item_set_color): Explicitly request size of menu item and enlarge color swatch. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@860 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/ChangeLog | 8 ++++++++ glabels2/src/color-combo-color-menu-item.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 8eed80b2..3e89fa1f 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,11 @@ +2009-08-13 Jim Evins + + * src/color-combo-color-menu-item.c: + (gl_color_combo_color_menu_item_init), + (gl_color_combo_color_menu_item_new), + (gl_color_combo_color_menu_item_set_color): + Explicitly request size of menu item and enlarge color swatch. + 2009-08-12 Jim Evins * src/label-text.c: (buffer_changed_cb), (draw_object), diff --git a/glabels2/src/color-combo-color-menu-item.c b/glabels2/src/color-combo-color-menu-item.c index 45c25381..742b3de5 100644 --- a/glabels2/src/color-combo-color-menu-item.c +++ b/glabels2/src/color-combo-color-menu-item.c @@ -36,6 +36,9 @@ /* Private macros and constants. */ /*===========================================*/ +#define SIZE 20 +#define PAD 5 + /*===========================================*/ /* Private types */ @@ -63,6 +66,7 @@ create_color_pixbuf (gdouble w, gdouble h, guint color); + /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ @@ -91,6 +95,8 @@ static void gl_color_combo_color_menu_item_init (glColorComboColorMenuItem *this) { this->priv = g_new0 (glColorComboColorMenuItemPrivate, 1); + + gtk_widget_set_size_request (GTK_MENU_ITEM (this), SIZE + 2*PAD, SIZE + 2*PAD); } @@ -126,7 +132,7 @@ gl_color_combo_color_menu_item_new (gint id, this->priv->id = id; - pixbuf = create_color_pixbuf (16, 16, color); + pixbuf = create_color_pixbuf (SIZE, SIZE, color); gtk_container_add (GTK_CONTAINER (this), gtk_image_new_from_pixbuf (pixbuf)); @@ -149,7 +155,7 @@ gl_color_combo_color_menu_item_set_color(glColorComboColorMenuItem *this, this->priv->id = id; - pixbuf = create_color_pixbuf (16, 16, color); + pixbuf = create_color_pixbuf (SIZE, SIZE, color); gtk_image_set_from_pixbuf (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (this))), pixbuf); -- 2.39.5