summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-29 16:38:33 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-30 09:39:42 +0100
commit5073fc170e3b45a6b80a4dbf85aa5e24338177b4 (patch)
tree3080ee2b89d1d88121ec7d092bfa01cd8975bb88 /vcl/source
parentcb17f33b673e7786a57028fddc85485c33e1576b (diff)
tdf#130857 qt weld: Evaluate GtkTreeView:show-expanders property
Evaluate the GtkTreeView:show-expanders property [1] and set the QTreeView::rootIsDecorated propert accordingly [2]: > This property holds whether to show controls for expanding and > collapsing top-level items > > Items with children are typically shown with controls to expand and > collapse them, allowing their children to be shown or hidden. If this > property is false, these controls are not shown for top-level items. > This can be used to make a single level tree structure appear like a > simple list of items. With this in place, there are no more expanders shown for Calc's "Sheets" -> "Show Sheet" dialog for the native Qt version, just like with the gtk3 or gen versions. [1] https://docs.gtk.org/gtk3/property.TreeView.show-expanders.html [2] https://doc.qt.io/qt-6/qtreeview.html#rootIsDecorated-prop Change-Id: I11bcdd39695d230866abddf6d4b305dd6af52f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177548 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/builder.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6cdce48f5cbd..e638eaa21854 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -3535,6 +3535,18 @@ bool BuilderBase::extractResizable(stringmap& rMap)
return bResizable;
}
+bool BuilderBase::extractShowExpanders(VclBuilder::stringmap& rMap)
+{
+ bool bShowExpanders = true;
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"show-expanders"_ustr);
+ if (aFind != rMap.end())
+ {
+ bShowExpanders = toBool(aFind->second);
+ rMap.erase(aFind);
+ }
+ return bShowExpanders;
+}
+
OUString BuilderBase::extractTooltipText(stringmap& rMap)
{
OUString sTooltipText;