cui/source/options/optgdlg.cxx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
New commits: commit df38063461947c87419b10942909f72785f8895c Author: Caolán McNamara <caol...@redhat.com> Date: Thu Feb 12 09:41:54 2015 +0000 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 <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 5d28c51..ba44f15 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);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits