[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 5 13:38:05 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx     |    1 +
 vcl/unx/gtk4/convert3to4.cxx |    9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit a3d2d01f55260ad422e07d4f326fc01f0414bd1d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 4 21:15:59 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 5 15:37:18 2021 +0200

    gtk4: ToggleButtons can have images too
    
    Change-Id: I1319ed84daa5d0d7d6a49887ad3ccc5b4c2fc3bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116736
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

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<css::xml::dom::XNode>& 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<css::xml::dom::XNode>& 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<css::xml::dom::XNode>& 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


More information about the Libreoffice-commits mailing list