vcl/unx/gtk3/gtk3gtkinst.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
New commits: commit 2c9082ed60d13aecb5eaeadc5b14a5a87896a907 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 13 15:57:07 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon May 13 22:19:40 2019 +0200 fix up GtkToolButton images Change-Id: I68d3fac978531e780c16e4a41a619d7a6c00cabb Reviewed-on: https://gerrit.libreoffice.org/72248 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index cf554c95f6f5..d92c81c0c426 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -9690,6 +9690,24 @@ private: } } } + else if (GTK_IS_TOOL_BUTTON(pWidget)) + { + GtkToolButton* pToolButton = GTK_TOOL_BUTTON(pWidget); + const gchar* icon_name = gtk_tool_button_get_icon_name(pToolButton); + if (icon_name) + { + OUString aIconName(icon_name, strlen(icon_name), RTL_TEXTENCODING_UTF8); + GdkPixbuf* pixbuf = load_icon_by_name(aIconName, m_aIconTheme, m_aUILang); + if (pixbuf) + { + GtkWidget* pImage = gtk_image_new_from_pixbuf(pixbuf); + g_object_unref(pixbuf); + gtk_tool_button_set_icon_widget(pToolButton, pImage); + gtk_widget_show(pImage); + } + } + } + //set helpids const gchar* pStr = gtk_buildable_get_name(GTK_BUILDABLE(pWidget)); size_t nLen = pStr ? strlen(pStr) : 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits