summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-10 13:21:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-10 13:39:20 +0100
commit8e0520acc72f45dbd35700dd129fe3e2dd1b6fd3 (patch)
tree36a47c8043fbe0740dea8b1409df4711e79ab329
parentafbc907de41f30988fed69c7e8eada9bfd43aef4 (diff)
setting WB_SCROLL on a toolbar only works from ctor
Change-Id: Iafd4d132abb63d698f8907c4aa71bd09c35babde
-rw-r--r--include/vcl/toolbox.hxx2
-rw-r--r--vcl/source/window/toolbox.cxx15
2 files changed, 16 insertions, 1 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 9a8f7e25c7d9..f3328e4fe441 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -480,7 +480,7 @@ public:
void SetFloatingLines( sal_uInt16 nFloatLines );
sal_uInt16 GetFloatingLines() const;
- void SetStyle( WinBits nNewStyle ) { mnWinStyle = nNewStyle; }
+ void SetStyle( WinBits nNewStyle );
WinBits GetStyle() const { return mnWinStyle; }
// enable/disable undocking
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 51491368e059..1517c1579114 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4470,6 +4470,21 @@ bool ToolBox::PrepareToggleFloatingMode()
return DockingWindow::PrepareToggleFloatingMode();
}
+void ToolBox::SetStyle(WinBits nNewStyle)
+{
+ mnWinStyle = nNewStyle;
+ if (!ImplIsFloatingMode())
+ {
+ bool bOldScroll = mbScroll;
+ mbScroll = (mnWinStyle & WB_SCROLL) ? true : false;
+ if (mbScroll != bOldScroll)
+ {
+ mbFormat = true;
+ ImplFormat();
+ }
+ }
+}
+
void ToolBox::ToggleFloatingMode()
{
DockingWindow::ToggleFloatingMode();