[gimp] app: use a smaller icon for the image tabs' close button
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use a smaller icon for the image tabs' close button
- Date: Thu, 15 Sep 2011 07:05:35 +0000 (UTC)
commit 9cfa0a5ddeb065905b1598774b057071023a8efc
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 15 09:04:38 2011 +0200
app: use a smaller icon for the image tabs' close button
Also make sure the visibility of the icon doesn't depend on
GTK+ settings by packing it manually.
app/display/gimpimagewindow.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index e42e62f..c853263 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -1860,12 +1860,11 @@ gimp_image_window_create_tab_label (GimpImageWindow *window,
GtkWidget *view;
GimpImage *image;
GtkWidget *button;
+ GtkWidget *gtk_image;
- /* Hbox */
hbox = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox);
- /* View */
view = gimp_view_new_by_types (gimp_get_user_context (shell->display->gimp),
GIMP_TYPE_VIEW, GIMP_TYPE_IMAGE,
GIMP_VIEW_SIZE_LARGE, 0, FALSE);
@@ -1876,17 +1875,20 @@ gimp_image_window_create_tab_label (GimpImageWindow *window,
if (image)
gimp_view_set_viewable (GIMP_VIEW (view), GIMP_VIEWABLE (image));
- /* Button */
button = gtk_button_new ();
- gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_set_can_focus (button, FALSE);
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_button_set_image (GTK_BUTTON (button),
- gtk_image_new_from_stock (GTK_STOCK_CLOSE,
- GTK_ICON_SIZE_MENU));
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_image = gtk_image_new_from_stock (GIMP_STOCK_CLOSE,
+ GTK_ICON_SIZE_MENU);
+ gtk_container_add (GTK_CONTAINER (button), gtk_image);
+ gtk_widget_show (gtk_image);
+
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gimp_image_window_shell_close_button_callback),
shell);
- gtk_widget_show (button);
return hbox;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]