From a3d2d01f55260ad422e07d4f326fc01f0414bd1d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 4 Jun 2021 21:15:59 +0100 Subject: gtk4: ToggleButtons can have images too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1319ed84daa5d0d7d6a49887ad3ccc5b4c2fc3bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116736 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/unx/gtk3/gtkinst.cxx | 1 + vcl/unx/gtk4/convert3to4.cxx | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 576a46c3b3a2..af796bc96e68 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -22048,6 +22048,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString& rUIFile != "sfx/ui/printeroptionsdialog.ui" && rUIFile != "sfx/ui/securityinfopage.ui" && rUIFile != "sfx/ui/singletabdialog.ui" && + rUIFile != "sfx/ui/templatedlg.ui" && rUIFile != "svt/ui/addresstemplatedialog.ui" && rUIFile != "svt/ui/datewindow.ui" && rUIFile != "svt/ui/javadisableddialog.ui" && diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index 2d009791d60e..6bb7e30918e9 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -475,7 +475,8 @@ ConvertResult Convert3To4(const css::uno::Reference& xNode if (sName == "always-show-image") { - if (GetParentObjectType(xChild) == "GtkButton") + if (GetParentObjectType(xChild) == "GtkButton" + || GetParentObjectType(xChild) == "GtkToggleButton") { // we will turn always-show-image into a GtkBox child for // GtkButton and a GtkLabel child for the GtkBox and move @@ -487,7 +488,8 @@ ConvertResult Convert3To4(const css::uno::Reference& xNode if (sName == "relief") { - if (GetParentObjectType(xChild) == "GtkLinkButton" + if (GetParentObjectType(xChild) == "GtkToggleButton" + || GetParentObjectType(xChild) == "GtkLinkButton" || GetParentObjectType(xChild) == "GtkButton") { assert(xChild->getFirstChild()->getNodeValue() == "none"); @@ -556,7 +558,8 @@ ConvertResult Convert3To4(const css::uno::Reference& xNode if (sName == "image") { - if (GetParentObjectType(xChild) == "GtkButton") + if (GetParentObjectType(xChild) == "GtkButton" + || GetParentObjectType(xChild) == "GtkToggleButton") { // find the image object, expected to be a child of "interface" and relocate // it to be a child of this GtkButton -- cgit