summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-28 14:22:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-28 17:08:59 +0200
commitaf8d12bd3a73381dfdfad92b63306369a665a2d7 (patch)
treef3aaed80b0832b631a2b9962e1daadf6d92e1d77
parent89e7341025b607491c90efdb74708e63d875c1e5 (diff)
gtk4: insert propagate-natural-width on seeing hscrollbar-policy of never
and likewise the vertical equivalents Change-Id: I28bb5de334aafc96de78c7d03c69f8df66e6a4ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116341 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx31
1 files changed, 30 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 5c5fbde02249..9f0ddc1a1f84 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -20673,6 +20673,32 @@ ConvertResult Convert3To4(const Reference<css::xml::dom::XNode>& xNode)
}
}
+ if (sName == "hscrollbar-policy")
+ {
+ if (GetParentObjectType(xChild) == "GtkScrolledWindow")
+ {
+ if (xChild->getFirstChild()->getNodeValue() == "never")
+ {
+ auto xDoc = xChild->getOwnerDocument();
+ auto xHasFrame = CreateProperty(xDoc, "propagate-natural-width", "True");
+ xChild->getParentNode()->insertBefore(xHasFrame, xChild);
+ }
+ }
+ }
+
+ if (sName == "vscrollbar-policy")
+ {
+ if (GetParentObjectType(xChild) == "GtkScrolledWindow")
+ {
+ if (xChild->getFirstChild()->getNodeValue() == "never")
+ {
+ auto xDoc = xChild->getOwnerDocument();
+ auto xHasFrame = CreateProperty(xDoc, "propagate-natural-height", "True");
+ xChild->getParentNode()->insertBefore(xHasFrame, xChild);
+ }
+ }
+ }
+
if (sName == "image")
{
if (GetParentObjectType(xChild) == "GtkButton")
@@ -22022,17 +22048,20 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
rUIFile != "sfx/ui/securityinfopage.ui" &&
rUIFile != "svt/ui/javadisableddialog.ui" &&
rUIFile != "svx/ui/fontworkgallerydialog.ui" &&
+ rUIFile != "modules/scalc/ui/colwidthdialog.ui" &&
+ rUIFile != "modules/scalc/ui/consolidatedialog.ui" &&
rUIFile != "modules/scalc/ui/dataform.ui" &&
rUIFile != "modules/scalc/ui/dataformfragment.ui" &&
rUIFile != "modules/scalc/ui/definedatabaserangedialog.ui" &&
rUIFile != "modules/scalc/ui/deletecells.ui" &&
rUIFile != "modules/scalc/ui/deletecontents.ui" &&
rUIFile != "modules/scalc/ui/goalseekdlg.ui" &&
+ rUIFile != "modules/scalc/ui/groupdialog.ui" &&
rUIFile != "modules/scalc/ui/inputstringdialog.ui" &&
rUIFile != "modules/scalc/ui/insertcells.ui" &&
rUIFile != "modules/scalc/ui/optimalcolwidthdialog.ui" &&
rUIFile != "modules/scalc/ui/optimalrowheightdialog.ui" &&
- rUIFile != "modules/scalc/ui/colwidthdialog.ui" &&
+ rUIFile != "modules/scalc/ui/protectsheetdlg.ui" &&
rUIFile != "modules/scalc/ui/rowheightdialog.ui" &&
rUIFile != "modules/scalc/ui/selectrange.ui" &&
rUIFile != "modules/scalc/ui/selectsource.ui" &&