summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-08 11:50:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-08 17:33:49 +0200
commitba394d2c9a2584ab9745b1b4f3deee3d7aa44636 (patch)
tree9ac1809eb9f85a6f1770af02648737f3ba966b66 /svtools
parent6aedcba229bcead97fdb54e90d12dac1f9e94eb8 (diff)
move m_bNavigationBar to BrowseBox so it knows best scroll/status bar height
to use, so databrowser with it (view data sources) has the tall case, while bases, create table in design view has the short case Change-Id: If3269d2ab2ce62f09acac624e5ef7e91ff91eaea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 72cf3aba9ae2..509d1265649f 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -148,13 +148,16 @@ public:
tools::Long BrowseBox::GetBarHeight() const
{
+ tools::Long nScrollBarSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ if (!m_bNavigationBar)
+ return nScrollBarSize;
+
// tdf#115941 because some platforms have things like overlay scrollbars, take a max
// of a statusbar height and a scrollbar height as the control area height
// (we can't ask the scrollbars for their size cause if we're zoomed they still have to be
// resized - which is done in UpdateScrollbars)
-
- return std::max(aStatusBarHeight->GetSizePixel().Height(), static_cast<tools::Long>(GetSettings().GetStyleSettings().GetScrollBarSize()));
+ return std::max(aStatusBarHeight->GetSizePixel().Height(), nScrollBarSize);
}
BrowseBox::BrowseBox( vcl::Window* pParent, WinBits nBits, BrowserMode nMode )
@@ -167,6 +170,7 @@ BrowseBox::BrowseBox( vcl::Window* pParent, WinBits nBits, BrowserMode nMode )
,m_nCornerHeight(0)
,m_nCornerWidth(0)
,m_nActualCornerWidth(0)
+ ,m_bNavigationBar(false)
{
ConstructImpl( nMode );
}