]> git.sur5r.net Git - glabels/commitdiff
2009-08-13 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Fri, 14 Aug 2009 02:53:53 +0000 (02:53 +0000)
committerJim Evins <evins@snaught.com>
Fri, 14 Aug 2009 02:53:53 +0000 (02:53 +0000)
* 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
glabels2/src/color-combo-color-menu-item.c

index 8eed80b282e32fab8c818cb9ce36ac6ebdec0a2e..3e89fa1f6cda4731e033df4ffc3703bc23807422 100644 (file)
@@ -1,3 +1,11 @@
+2009-08-13  Jim Evins  <evins@snaught.com>
+
+       * 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  <evins@snaught.com>
 
        * src/label-text.c: (buffer_changed_cb), (draw_object),
index 45c253817eb39d3a8d44613f33e1a7b059b73bd0..742b3de53ede6589cb1dd9f9cd264c86249c0a7f 100644 (file)
@@ -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);