summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-12 15:13:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-11-14 10:48:45 +0100
commitd538de17562b2c7ca2c382aeae7c95827999abe5 (patch)
tree0e66027178e07fc75e434be6fa271b5c0aae28c0 /vcl
parent4200a025df1cadecf03904e54f7cfe6aa1a249ef (diff)
Related: tdf#131970 icon-switcher should be in single-selection mode
Change-Id: Ie5ac5ccf1273905832e934998f206425401b0f30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105763 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/imivctl.hxx5
-rw-r--r--vcl/source/control/ivctrl.cxx6
2 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 8e63a555b6b9..9695e99a665d 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -252,6 +252,11 @@ public:
SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
~SvxIconChoiceCtrl_Impl();
+ void SetSelectionMode(SelectionMode eMode)
+ {
+ eSelectionMode = eMode;
+ }
+
void Clear( bool bInCtor );
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const { return nWinBits; }
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index dc304e511937..87b746c88da0 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -97,6 +97,11 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( vcl::Window* pParent, WinBits nWinStyle )
_pImpl->SetPositionMode( SvxIconChoiceCtrlPositionMode::AutoArrange );
}
+void SvtIconChoiceCtrl::SetSelectionMode(SelectionMode eMode)
+{
+ _pImpl->SetSelectionMode(eMode);
+}
+
SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
{
disposeOnce();
@@ -440,6 +445,7 @@ VerticalTabControl::VerticalTabControl(vcl::Window* pParent)
{
SetStyle(GetStyle() | WB_DIALOGCONTROL);
SetType(WindowType::VERTICALTABCONTROL);
+ m_xChooser->SetSelectionMode(SelectionMode::Single);
m_xChooser->SetClickHdl(LINK(this, VerticalTabControl, ChosePageHdl_Impl));
m_xChooser->set_width_request(110);
m_xChooser->set_height_request(400);