summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-16 10:41:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-16 13:58:50 +0100
commitaf1b9bf6e1a5d9622faa81ae2e2ddb1cf26153f8 (patch)
tree8cec224f911d277e85f139de81aba570f70d2194 /vcl/unx
parenteda22714fd83a8b2ace0369b0a71825f11fbf85a (diff)
avoid using always-show-arrow in gtk4 < 4.4
Change-Id: Ie2df9cd91a5ea857965d24dc669a6c1d94c965a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125293 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk4/convert3to4.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index 29b51a747ff7..d6f1e7e0fa29 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -731,7 +731,7 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode
if (sName == "draw-indicator")
{
assert(toBool(xChild->getFirstChild()->getNodeValue()));
- if (GetParentObjectType(xChild) == "GtkMenuButton")
+ if (GetParentObjectType(xChild) == "GtkMenuButton" && gtk_get_minor_version() >= 4)
{
auto xDoc = xChild->getOwnerDocument();
auto xAlwaysShowArrow = CreateProperty(xDoc, "always-show-arrow", "True");
@@ -1140,8 +1140,11 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode
else if (sClass == "GtkMenuToolButton")
{
xClass->setNodeValue("GtkMenuButton");
- auto xAlwaysShowArrow = CreateProperty(xDoc, "always-show-arrow", "True");
- insertAsFirstChild(xChild, xAlwaysShowArrow);
+ if (gtk_get_minor_version() >= 4)
+ {
+ auto xAlwaysShowArrow = CreateProperty(xDoc, "always-show-arrow", "True");
+ insertAsFirstChild(xChild, xAlwaysShowArrow);
+ }
}
else if (sClass == "GtkRadioToolButton")
{