[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 5 14:42:29 UTC 2021


 sw/source/uibase/utlui/glbltree.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bde7232cc3ce6b23b0d43314e690907d2282d45c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 5 10:18:51 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 5 15:41:42 2021 +0100

    don't use the vcl::Window parent to derive a treeview size
    
    Change-Id: I8076c3db1fd917110445900404b599e821df698d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111997
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 095ec76e581c..754adf7dc736 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -128,8 +128,8 @@ SwGlobalTree::SwGlobalTree(std::unique_ptr<weld::TreeView> xTreeView, SwNavigati
     , m_xDialog(pDialog)
     , m_pActiveShell(nullptr)
 {
-    Size aSize(m_xDialog->LogicToPixel(Size(110, 112), MapMode(MapUnit::MapAppFont)));;
-    m_xTreeView->set_size_request(aSize.Width(), aSize.Height());
+    m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 30,
+                                  m_xTreeView->get_text_height() * 14);
 
     m_aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
     m_aUpdateTimer.SetInvokeHandler(LINK(this, SwGlobalTree, Timeout));


More information about the Libreoffice-commits mailing list