diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-04-26 10:47:00 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-04-29 07:52:27 +0200 |
commit | b64751ba28fd69fb2a93a21b10a92b68f4dd2097 (patch) | |
tree | e8a45d0349172390a53dd29cbf9d2e22f811a647 /vcl/source/window/builder.cxx | |
parent | 30de13743f144aced83bc43d310592f82788c910 (diff) |
tdf#99528 Properly layout vertical tabs without icons
Implement a proper list mode for VerticalTabControl.
Before this was only used in the Hyperlink dialog with large icons.
Change-Id: I227643392ef4840a705555b379734e2993db0f13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166702
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'vcl/source/window/builder.cxx')
-rw-r--r-- | vcl/source/window/builder.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index fcb3a21fee30..f2b0d381c7fa 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -985,6 +985,18 @@ namespace return bVertical; } + bool extractVerticalTabsWithIcons(VclBuilder::stringmap &rMap) + { + bool bWithIcons = false; + VclBuilder::stringmap::iterator aFind = rMap.find("group-name"); + if (aFind != rMap.end()) + { + bWithIcons = aFind->second.equalsIgnoreAsciiCase("icons"); + rMap.erase(aFind); + } + return bWithIcons; + } + bool extractInconsistent(VclBuilder::stringmap &rMap) { bool bInconsistent = false; @@ -2061,7 +2073,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString if (!extractVerticalTabPos(rMap)) xWindow = VclPtr<TabControl>::Create(pParent, WB_STDTABCONTROL|WB_3DLOOK); else - xWindow = VclPtr<VerticalTabControl>::Create(pParent); + xWindow = VclPtr<VerticalTabControl>::Create(pParent, extractVerticalTabsWithIcons(rMap)); } else if (name == "GtkDrawingArea") { |