Skip to content

Commit 0243cf5

Browse files
committed
dialogs: Show icons in Tips Dialog on Windows
The Previous and Next buttons have arrow icons. However, these have not shown up on Windows since at least 2.10, as buttons created with gtk_dialog_add_button () don't automatically make their icons visible on all platforms. This patch uses the existing "image" variable to store the icon rather than passing it inline in gtk_button_set_image (). This allows us to explicitly set it to be visible so it shows for all users.
1 parent 8fbd672 commit 0243cf5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

app/dialogs/tips-dialog.c

+8-6
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,17 @@ tips_dialog_create (Gimp *gimp)
132132

133133
button = gtk_dialog_add_button (GTK_DIALOG (tips_dialog),
134134
_("_Previous Tip"), RESPONSE_PREVIOUS);
135-
gtk_button_set_image (GTK_BUTTON (button),
136-
gtk_image_new_from_icon_name (GIMP_ICON_GO_PREVIOUS,
137-
GTK_ICON_SIZE_BUTTON));
135+
image = gtk_image_new_from_icon_name (GIMP_ICON_GO_PREVIOUS,
136+
GTK_ICON_SIZE_BUTTON);
137+
gtk_button_set_image (GTK_BUTTON (button), image);
138+
gtk_widget_set_visible (image, TRUE);
138139

139140
button = gtk_dialog_add_button (GTK_DIALOG (tips_dialog),
140141
_("_Next Tip"), RESPONSE_NEXT);
141-
gtk_button_set_image (GTK_BUTTON (button),
142-
gtk_image_new_from_icon_name (GIMP_ICON_GO_NEXT,
143-
GTK_ICON_SIZE_BUTTON));
142+
image = gtk_image_new_from_icon_name (GIMP_ICON_GO_NEXT,
143+
GTK_ICON_SIZE_BUTTON);
144+
gtk_button_set_image (GTK_BUTTON (button), image);
145+
gtk_widget_set_visible (image, TRUE);
144146

145147
gtk_dialog_set_response_sensitive (GTK_DIALOG (tips_dialog),
146148
RESPONSE_NEXT, tips_count > 1);

0 commit comments

Comments
 (0)