diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-18 21:30:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-20 12:41:53 +0200 |
commit | 1f8d45c276760a173c3e30c78b8b740414a5b05f (patch) | |
tree | 4e22f39b8515a1839c9dc64146725ca02ec9b6f9 /vcl/source | |
parent | 6e5e83025c948b699bb65839ef810a45a98ba014 (diff) |
weld SvxColorTabPage
Change-Id: I5dc6f949edcb34aa110dfa9415e2ac886d0dfa4c
Reviewed-on: https://gerrit.libreoffice.org/56111
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 26 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 20f957af82d3..c40e5fd27c46 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -805,6 +805,32 @@ public: rVertScrollBar.SetRangeMax(upper); } + virtual void set_vpolicy(VclPolicyType eVPolicy) override + { + WinBits nWinBits = m_xScrolledWindow->GetStyle() & ~(WB_AUTOVSCROLL|WB_VSCROLL); + if (eVPolicy == VclPolicyType::ALWAYS) + nWinBits |= WB_VSCROLL; + else if (eVPolicy == VclPolicyType::AUTOMATIC) + nWinBits |= WB_AUTOVSCROLL; + m_xScrolledWindow->SetStyle(nWinBits); + m_xScrolledWindow->queue_resize(); + } + + virtual VclPolicyType get_vpolicy() const override + { + WinBits nWinBits = m_xScrolledWindow->GetStyle(); + if (nWinBits & WB_AUTOVSCROLL) + return VclPolicyType::AUTOMATIC; + else if (nWinBits & WB_VSCROLL) + return VclPolicyType::ALWAYS; + return VclPolicyType::NEVER; + } + + virtual int get_vscroll_width() const override + { + return m_xScrolledWindow->getVertScrollBar().GetSizePixel().Width(); + } + virtual void set_user_managed_scrolling() override { m_bUserManagedScrolling = true; diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index e29619092ba5..26cb8d0bb8d8 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1926,6 +1926,8 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) { m_pVScroll->Show(nAvailHeight < aChildReq.Height()); } + else if (m_pVScroll->IsVisible() != bool(GetStyle() & WB_VSCROLL)) + m_pVScroll->Show((GetStyle() & WB_VSCROLL) != 0); if (m_pVScroll->IsVisible()) nAvailWidth -= getLayoutRequisition(*m_pVScroll).Width(); @@ -1942,6 +1944,8 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) if (GetStyle() & WB_AUTOVSCROLL) m_pVScroll->Show(nAvailHeight < aChildReq.Height()); } + else if (m_pHScroll->IsVisible() != bool(GetStyle() & WB_HSCROLL)) + m_pHScroll->Show((GetStyle() & WB_HSCROLL) != 0); Size aInnerSize(rAllocation); aInnerSize.AdjustWidth(-2); |