include/svtools/brwbox.hxx | 2 ++ include/svx/gridctrl.hxx | 1 - svtools/source/brwbox/brwbox1.cxx | 8 ++++++-- svx/source/fmcomp/gridctrl.cxx | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit ba394d2c9a2584ab9745b1b4f3deee3d7aa44636 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 8 11:50:02 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Aug 8 17:33:49 2022 +0200 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 <caol...@redhat.com> diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index bba7585a0ba1..b2a7233874c0 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -389,6 +389,8 @@ protected: ::vcl::IAccessibleFactory& getAccessibleFactory(); protected: + bool m_bNavigationBar; + sal_uInt16 ColCount() const; // software plug for database access diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index e029b8e23f8a..54a99269cf7f 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -292,7 +292,6 @@ private: bool m_bDesignMode : 1; // default = sal_False bool m_bRecordCountFinal : 1; - bool m_bNavigationBar : 1; bool m_bSynchDisplay : 1; bool m_bHandle : 1; 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 ); } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index ab8f128a7b29..f55b3c846f09 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -707,7 +707,6 @@ DbGridControl::DbGridControl( ,m_nLastRowId(-1) ,m_bDesignMode(false) ,m_bRecordCountFinal(false) - ,m_bNavigationBar(true) ,m_bSynchDisplay(true) ,m_bHandle(true) ,m_bFilterMode(false) @@ -716,6 +715,7 @@ DbGridControl::DbGridControl( ,m_bHideScrollbars( false ) ,m_bUpdating(false) { + m_bNavigationBar = true; OUString sName(SvxResId(RID_STR_NAVIGATIONBAR)); m_aBar->SetAccessibleName(sName);