Skip to content

Commit

Permalink
Fix too large toolbar icons in modern GTK versions
Browse files Browse the repository at this point in the history
Explicitly set icon size to GTK_ICON_SIZE_SMALL_TOOLBAR so that they
have consistent size with a) modern GTK+4 toolbars and b) match the
symbolic icon's ideal size.
  • Loading branch information
vslavik committed Dec 8, 2023
1 parent 9bfc585 commit d97a9f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wx/main_toolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class WXMainToolbar : public MainToolbar
m_idUpdate = XRCID("toolbar_update");

#ifdef __WXGTK3__
gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(Toolbar())), GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
GtkToolbar *gtb = Toolbar();
gtk_toolbar_set_icon_size(gtb, GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(gtb)), GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
SetIcon(0 , "document-open-symbolic");
SetIcon(1 , "document-save-symbolic");
SetIcon(3 , "poedit-validate-symbolic");
Expand Down

0 comments on commit d97a9f0

Please sign in to comment.