summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-02-20 10:08:55 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-02-21 13:17:19 +0100
commit16a3d8f4f010ad9b9413ac4d40ef8fe0f7d633e7 (patch)
tree10afdf4d824ee5c4ba4b48564aa8a8cea74b10d4 /cui
parent180f2860525fb7ed4892b417b20c3f2f9cbb44e0 (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')
-rw-r--r--cui/source/options/optgenrl.cxx13
-rw-r--r--cui/source/options/treeopt.cxx5
-rw-r--r--cui/uiconfig/ui/optuserpage.ui7
3 files changed, 19 insertions, 6 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 -----------------------------------------------------
diff --git a/cui/uiconfig/ui/optuserpage.ui b/cui/uiconfig/ui/optuserpage.ui
index 96c0a77cfad0..ac080f43b32c 100644
--- a/cui/uiconfig/ui/optuserpage.ui
+++ b/cui/uiconfig/ui/optuserpage.ui
@@ -883,8 +883,9 @@
</child>
<child>
<object class="GtkComboBox" id="encryptionkey">
- <property name="can_focus">False</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="model">liststore1</property>
</object>
<packing>
@@ -896,6 +897,7 @@
<object class="GtkComboBox" id="signingkey">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="model">liststore1</property>
</object>
<packing>
@@ -904,10 +906,11 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="encrypttoself">
+ <object class="GtkCheckButton" id="encrypttoself:wrap">
<property name="label" translatable="yes" context="optuserpage|encrypttoself">When encrypting documents, always encrypt to self</property>
<property name="can_focus">True</property>
<property name="visible">True</property>
+ <property name="xalign">0</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>