diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-02-27 23:07:04 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-03-01 15:06:53 +0100 |
commit | 2ead0d1ea024ec8771615400d699194b2fc44efe (patch) | |
tree | da390e0b5316b8d4395b6120d84ea1e5730e2724 /cui/source | |
parent | af1f91ae294e90c91ea5a5b78d6cc020b893e6c7 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/treeopt.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
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 ----------------------------------------------------- |