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

New commits:
commit 2ead0d1ea024ec8771615400d699194b2fc44efe
Author: Katarina Behrens <katarina.behr...@cib.de>
Date:   Tue Feb 27 23:07:04 2018 +0100

    tdf#115994: Extensions' option pages need fixed pref. size
    
    as they are fixed size .xdl-based dialogs mostly
    But because of tdf#115015 calculate this preferred size as approx.
    14 text edits + some padding to make sure crypto settings will fit
    the allocated space
    
    Change-Id: If31c4944e0909b281da5e8266ba1d1001b7c5309
    Reviewed-on: https://gerrit.libreoffice.org/50474
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8bfd3462b8c9..4ff782ae761f 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -19,6 +19,7 @@
 
 #include <memory>
 #include <config_features.h>
+#include <config_gpgme.h>
 
 #include <svx/dialogs.hrc>
 
@@ -489,9 +490,16 @@ void OfaTreeOptionsDialog::InitWidgets()
     get(pTreeLB, "pages");
     get(pTabBox, "box");
     Size aSize(pTabBox->LogicToPixel(Size(278, 259), 
MapMode(MapUnit::MapAppFont)));
-    pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25);
-    pTreeLB->set_height_request(pTreeLB->GetTextHeight() *  32);
     pTabBox->set_width_request(aSize.Width());
+#if HAVE_FEATURE_GPGME
+    // tdf#115015: make enough space for crypto settings (approx. 14 text 
edits + padding)
+    pTabBox->set_height_request((Edit::GetMinimumEditSize().Height() + 6) * 
14);
+#else
+    pTabBox->set_height_request(aSize.Height() - 
get_action_area()->get_preferred_size().Height());
+#endif
+    pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25);
+    pTreeLB->set_height_request(pTabBox->get_height_request());
+
 }
 
 // Ctor() with Frame -----------------------------------------------------
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to