sfx2/source/dialog/alienwarn.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
New commits: commit 2d6441cfc4248a8c8d9aaa3a9dcd4b608b77b858 Author: Andras Timar <ati...@suse.com> Date: Mon Jan 9 21:18:38 2012 +0100 autoresize 'Use ODF format' button, too diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 6acf107..e913c88 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -155,11 +155,6 @@ void SfxAlienWarningDialog::InitSize() (*pCurrent)->SetPosPixel( aNewPos ); } - // new size of the dialog - aNewSize = GetSizePixel(); - aNewSize.Height() -= nDelta; - SetSizePixel( aNewSize ); - // recalculate the size and position of the buttons m_aMoreInfoBtn.Hide(); nTxtW = m_aKeepCurrentBtn.GetCtrlTextWidth( m_aKeepCurrentBtn.GetText() ); @@ -170,6 +165,17 @@ void SfxAlienWarningDialog::InitSize() Point aPos = m_aSaveODFBtn.GetPosPixel(); aPos.X() = AW_COL_3 + nTxtW; m_aSaveODFBtn.SetPosPixel( aPos ); + nTxtW = m_aSaveODFBtn.GetCtrlTextWidth( m_aSaveODFBtn.GetText() ); + nTxtW += IMPL_EXTRA_BUTTON_WIDTH; + aNewSize = m_aSaveODFBtn.GetSizePixel(); + aNewSize.Width() = nTxtW; + m_aSaveODFBtn.SetSizePixel( aNewSize ); + + // new size of the dialog + aNewSize = GetSizePixel(); + aNewSize.Height() -= nDelta; + SetSizePixel( aNewSize ); + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits