Set toolbar buttons to show both icon and text

And make the icon small to recover some vertical screen estate.
The motivation for this is that Gtk has dropped the ability for users
to change a toolbar's appearance. And as our icons are often less
than descriptive many users benefit from having textual descriptions
as well. This is the best compromise we can make until the gui
gets an in-depth redesign.
This commit is contained in:
Geert Janssens
2018-09-03 19:39:16 +02:00
parent 705e866472
commit e47b460acb
3 changed files with 15 additions and 0 deletions

View File

@@ -308,6 +308,10 @@ gnc_embedded_window_add_widget (GtkUIManager *merge,
if (GTK_IS_TOOLBAR (widget))
{
priv->toolbar = widget;
gtk_toolbar_set_style (GTK_TOOLBAR(priv->toolbar),
GTK_TOOLBAR_BOTH);
gtk_toolbar_set_icon_size (GTK_TOOLBAR(priv->toolbar),
GTK_ICON_SIZE_SMALL_TOOLBAR);
}
gtk_box_pack_start (GTK_BOX (priv->menu_dock), widget, FALSE, FALSE, 0);

View File

@@ -3838,6 +3838,10 @@ gnc_main_window_add_widget (GtkUIManager *merge,
if (GTK_IS_TOOLBAR (widget))
{
priv->toolbar = widget;
gtk_toolbar_set_style (GTK_TOOLBAR(priv->toolbar),
GTK_TOOLBAR_BOTH);
gtk_toolbar_set_icon_size (GTK_TOOLBAR(priv->toolbar),
GTK_ICON_SIZE_SMALL_TOOLBAR);
}
gtk_box_pack_start (GTK_BOX (priv->menu_dock), widget, FALSE, FALSE, 0);

View File

@@ -1681,6 +1681,13 @@ recnWindow_add_widget (GtkUIManager *merge,
GtkWidget *widget,
GtkBox *dock)
{
if (GTK_IS_TOOLBAR (widget))
{
gtk_toolbar_set_style (GTK_TOOLBAR(widget),
GTK_TOOLBAR_BOTH);
gtk_toolbar_set_icon_size (GTK_TOOLBAR(widget),
GTK_ICON_SIZE_SMALL_TOOLBAR);
}
gtk_box_pack_start (GTK_BOX (dock), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
}