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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 14 08:57:48 UTC 2020


 cui/source/options/treeopt.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 3b081e66052e173ca04b4d9c0a6b2054aeb70d4c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Feb 13 16:31:23 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 14 09:57:16 2020 +0100

    drop need to include vcl/edit.hxx in cui
    
    Change-Id: I9479a7e8fc5b3897e48efc47dbae979137718bc2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88618
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 19e6be3849ff..59c73e393739 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -97,7 +97,6 @@
 #include <unotools/moduleoptions.hxx>
 #include <unotools/optionsdlg.hxx>
 #include <unotools/viewoptions.hxx>
-#include <vcl/edit.hxx>
 #include <vcl/help.hxx>
 #include <vcl/svapp.hxx>
 #include <sal/log.hxx>
@@ -482,8 +481,13 @@ void OfaTreeOptionsDialog::InitWidgets()
     xTabBox = m_xBuilder->weld_container("box");
     Size aSize(xTreeLB->get_approximate_digit_width() * 82, xTreeLB->get_height_rows(30));
 #if HAVE_FEATURE_GPGME
-    // tdf#115015: make enough space for crypto settings (approx. 14 text edits + padding)
-    aSize.setHeight((Edit::GetMinimumEditSize().Height() + 6) * 14);
+    {
+        // load this little .ui just to measure the height of an Entry
+        std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "cui/ui/namedialog.ui"));
+        std::unique_ptr<weld::Entry> xEntry(xBuilder->weld_entry("name_entry"));
+        // tdf#115015: make enough space for crypto settings (approx. 14 text edits + padding)
+        aSize.setHeight((xEntry->get_preferred_size().Height() + 6) * 14);
+    }
 #endif
     xTabBox->set_size_request(aSize.Width(), aSize.Height());
     xTreeLB->set_size_request(xTreeLB->get_approximate_digit_width() * 30, aSize.Height());


More information about the Libreoffice-commits mailing list