summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-12 09:41:54 +0000
committerEike Rathke <erack@redhat.com>2015-02-12 14:36:41 +0000
commitdf38063461947c87419b10942909f72785f8895c (patch)
tree650d0c2ec910f232c2ed26248b96a0350dfcb544 /cui
parent82a505aae7fdb532e250b6acce1d33431cedfa88 (diff)
Related: fdo#87876 calculate ideal width after icon style entries are added
which stops the ui jumping around if that drop down is activated Change-Id: I6abe00f125f41f4a83b30f1ffb6c8d039d0372ed Reviewed-on: https://gerrit.libreoffice.org/14438 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5d28c51bce73..ba44f15fbed7 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -639,19 +639,6 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
get(m_pIconSizeLB, "iconsize");
get(m_pIconStyleLB, "iconstyle");
get(m_pSystemFont, "systemfont");
-
- VclContainer *pRef = get<VclContainer>("refgrid");
- //fdo#65595, we need height-for-width support here, but for now we can
- //bodge it
- Size aPrefSize(m_pSystemFont->get_preferred_size());
- Size aSize(pRef->get_preferred_size());
- if (aPrefSize.Width() > aSize.Width())
- {
- aSize = m_pSystemFont->CalcMinimumSize(aSize.Width());
- m_pSystemFont->set_width_request(aSize.Width());
- m_pSystemFont->set_height_request(aSize.Height());
- }
-
get(m_pFontAntiAliasing, "aafont");
get(m_pAAPointLimitLabel, "aafrom");
get(m_pAAPointLimit, "aanf");
@@ -665,8 +652,8 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
get(m_pForceOpenGL, "forceopengl");
//fdo#87876 , we need height-for-width support here, but for now we can
//bodge it
- aPrefSize = m_pForceOpenGL->get_preferred_size();
- aSize = m_pForceOpenGL->CalcMinimumSize(40*approximate_char_width());
+ Size aPrefSize(m_pForceOpenGL->get_preferred_size());
+ Size aSize(m_pForceOpenGL->CalcMinimumSize(40*approximate_char_width()));
if (aPrefSize.Width() > aSize.Width())
{
m_pForceOpenGL->set_width_request(aSize.Width());
@@ -713,10 +700,23 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
OUString(")");
m_pIconStyleLB->InsertEntry(entryForAuto);
- for (std::vector<vcl::IconThemeInfo>::const_iterator aI = mInstalledIconThemes.begin(); aI != mInstalledIconThemes.end(); ++aI) {
+ for (std::vector<vcl::IconThemeInfo>::const_iterator aI = mInstalledIconThemes.begin(); aI != mInstalledIconThemes.end(); ++aI)
+ {
m_pIconStyleLB->InsertEntry(aI->GetDisplayName());
}
+ VclContainer *pRef = get<VclContainer>("refgrid");
+ //fdo#65595, we need height-for-width support here, but for now we can
+ //bodge it
+ aPrefSize = m_pSystemFont->get_preferred_size();
+ aSize = pRef->get_preferred_size();
+ if (aPrefSize.Width() > aSize.Width())
+ {
+ aSize = m_pSystemFont->CalcMinimumSize(aSize.Width());
+ m_pSystemFont->set_width_request(aSize.Width());
+ m_pSystemFont->set_height_request(aSize.Height());
+ }
+
// separate auto and other icon themes
m_pIconStyleLB->SetSeparatorPos( 0 );
m_pIconStyleLB->SelectEntryPos(0);