sfx2/source/control/listview.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d8789d175af75e7768e601662619b116e9780937
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Fri Sep 23 20:48:16 2022 +0200
Commit:     Rafael Lima <rafael.palma.l...@gmail.com>
CommitDate: Mon Sep 26 15:47:29 2022 +0200

    tdf#151143 Fix the size of Template Manager in ListView mode
    
    A previous patch (410bff99a708371eed6a82677b44e2151a4a990a) fixed the size 
of the ThumbnailView in the Template Manager.
    
    However it did not fix the size in ListView mode. So when the Template 
Manager opened in ListView, the height of the ListView the same as the number 
of available styles (rows in the list). The problem was most noticeable in 
Draw, which has just one template, but it actually affected all modules.
    
    This patch fixes this issue in ListView.
    
    Change-Id: Id6bf00b63e276b057ee191b191f57f295e9801cb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140502
    Tested-by: Jenkins
    Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/sfx2/source/control/listview.cxx b/sfx2/source/control/listview.cxx
index d516eea5d160..ca3818ab9d70 100644
--- a/sfx2/source/control/listview.cxx
+++ b/sfx2/source/control/listview.cxx
@@ -57,6 +57,9 @@ ListView::ListView(std::unique_ptr<weld::TreeView> xTreeView)
         static_cast<int>(nDigitWidth * 18) /* Modify Column */
     };
 
+    // tdf#151143 Make the size of ListView and ThumbnailView the same
+    mxTreeView->set_size_request(TEMPLATE_ITEM_MAX_WIDTH * 5, 
TEMPLATE_ITEM_MAX_HEIGHT_SUB * 3);
+
     mxTreeView->set_column_fixed_widths(aWidths);
     mxTreeView->set_selection_mode(SelectionMode::Multiple);
     mxTreeView->connect_query_tooltip(LINK(this, ListView, QueryTooltipHdl));

Reply via email to