[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source sw/uiconfig

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 6 23:34:55 UTC 2021


 sw/source/ui/index/cnttab.cxx                |    5 +++--
 sw/uiconfig/swriter/ui/assignstylesdialog.ui |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 660a8eae3c5d92f08bf72342f41fd97249099ab5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 5 11:18:45 2021 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sat Aug 7 01:34:17 2021 +0200

    Resolves: tdf#143720 treeview not resizing to fill available space
    
    Change-Id: I041c3a743b8624f49bfe57e8a4469535e334e5dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120068
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index bcabdc6aabbb..23b14d20e410 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);
diff --git a/sw/uiconfig/swriter/ui/assignstylesdialog.ui b/sw/uiconfig/swriter/ui/assignstylesdialog.ui
index 33902bf15a0e..51c846eb27c5 100644
--- a/sw/uiconfig/swriter/ui/assignstylesdialog.ui
+++ b/sw/uiconfig/swriter/ui/assignstylesdialog.ui
@@ -186,6 +186,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
+                        <property name="hexpand">True</property>
                         <property name="column_spacing">12</property>
                         <child>
                           <object class="GtkButtonBox" id="buttonbox1">


More information about the Libreoffice-commits mailing list