diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-12 15:13:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-14 10:48:45 +0100 |
commit | d538de17562b2c7ca2c382aeae7c95827999abe5 (patch) | |
tree | 0e66027178e07fc75e434be6fa271b5c0aae28c0 | |
parent | 4200a025df1cadecf03904e54f7cfe6aa1a249ef (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>
-rw-r--r-- | include/vcl/toolkit/ivctrl.hxx | 1 | ||||
-rw-r--r-- | vcl/source/control/imivctl.hxx | 5 | ||||
-rw-r--r-- | vcl/source/control/ivctrl.cxx | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx index f4c50b48c84d..e322631036a3 100644 --- a/include/vcl/toolkit/ivctrl.hxx +++ b/include/vcl/toolkit/ivctrl.hxx @@ -213,6 +213,7 @@ public: virtual void dispose() override; WinBits GetStyle() const; + void SetSelectionMode(SelectionMode eMode); void SetFont( const vcl::Font& rFont ); void SetPointFont( const vcl::Font& rFont ); 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); |