diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-02-20 10:08:55 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-02-21 13:17:19 +0100 |
commit | 16a3d8f4f010ad9b9413ac4d40ef8fe0f7d633e7 (patch) | |
tree | 10afdf4d824ee5c4ba4b48564aa8a8cea74b10d4 /cui/source | |
parent | 180f2860525fb7ed4892b417b20c3f2f9cbb44e0 (diff) |
tdf#115015: make crypto settings better fit allocated space
Oh dear how much do I dislike fixed size dialogs. Everytime they
are enlarged to fit new content (esp. gtk3 is rather space-greedy
there) someone starts to whine the dialog is now too large
Doing what e6d7d7375221 does is not really an option, since there
are some 30+ tabpages to try and test for optimal size here.
Change-Id: I3ffb2d794f76781eb62186093b928289593585cf
Reviewed-on: https://gerrit.libreoffice.org/50032
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optgenrl.cxx | 13 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 5 |
2 files changed, 14 insertions, 4 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 1b160fb628d9..872001b2f233 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -302,7 +302,7 @@ void SvxGeneralTabPage::InitCryptography() { #if HAVE_FEATURE_GPGME m_pCryptoFrame->Show(); - // unused yet, I just wanted to see if this delivers the desired results + uno::Reference< xml::crypto::XSEInitializer > xSEInitializer; try { @@ -321,6 +321,17 @@ void SvxGeneralTabPage::InitCryptography() m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName()); } } + + //tdf#115015: wrap checkbox text and listboxes if necessary + Size aPrefSize(m_pEncryptToSelfCB->get_preferred_size()); + Size aSize(m_pEncryptToSelfCB->CalcMinimumSize(40*approximate_char_width())); + if (aPrefSize.Width() > aSize.Width()) + { + m_pSigningKeyLB->set_width_request(aSize.Width()); + m_pEncryptionKeyLB->set_width_request(aSize.Width()); + m_pEncryptToSelfCB->set_width_request(aSize.Width()); + } + } } catch ( uno::Exception const & ) diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index fb01bfeb1945..877f2cfa6a95 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -489,10 +489,9 @@ void OfaTreeOptionsDialog::InitWidgets() get(pTreeLB, "pages"); get(pTabBox, "box"); Size aSize(pTabBox->LogicToPixel(Size(278, 259), MapMode(MapUnit::MapAppFont))); - pTabBox->set_width_request(aSize.Width()); - pTabBox->set_height_request(aSize.Height() - get_action_area()->get_preferred_size().Height()); pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25); - pTreeLB->set_height_request(pTabBox->get_height_request()); + pTreeLB->set_height_request(pTreeLB->GetTextHeight() * 32); + pTabBox->set_width_request(aSize.Width()); } // Ctor() with Frame ----------------------------------------------------- |