[Libreoffice-commits] .: sfx2/source
Andras Timar
timar at kemper.freedesktop.org
Mon Jan 9 12:20:21 PST 2012
sfx2/source/dialog/alienwarn.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 2e0ec77cd6bbfe599d63f3a67218c1cf09bb19a6
Author: Andras Timar <atimar at 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: */
More information about the Libreoffice-commits
mailing list