diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-05 11:18:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-05 13:43:43 +0200 |
commit | 4e7212c4a341eef0521c4c6300c65bf42d756fd1 (patch) | |
tree | 54e591ca97ac5ef862f16bb3fd5544637751fab1 /sw/source/ui/index | |
parent | 28ddcd59fab3c4994a5e4e94f05e21ad94664a76 (diff) |
Resolves: tdf#143720 treeview not resizing to fill available space
Change-Id: I041c3a743b8624f49bfe57e8a4469535e334e5dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/index')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 397e062d7da5..ffddc80892db 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -513,7 +513,8 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, aWidths.push_back(m_xHeaderTree->get_pixel_size(sTitle).Width() + nPadding); } m_xHeaderTree->set_column_fixed_widths(aWidths); - auto nWidth = std::accumulate(aWidths.begin(), aWidths.end(), 0); + auto nWidth = std::accumulate(aWidths.begin(), aWidths.end(), + Application::GetSettings().GetStyleSettings().GetScrollBarSize()); m_xHeaderTree->set_size_request(nWidth, m_xHeaderTree->get_height_rows(15)); int nRow(0); @@ -576,7 +577,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, IMPL_LINK(SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size&, rSize, void) { - auto nWidth = rSize.Width(); + auto nWidth = rSize.Width() - Application::GetSettings().GetStyleSettings().GetScrollBarSize(); std::vector<int> aWidths; aWidths.push_back(0); |