From dde025efacba24edc700989a357c5fddbb0e4886 Mon Sep 17 00:00:00 2001 From: dbarisakkurt Date: Thu, 2 Feb 2012 16:12:46 +0000 Subject: I added some links and removed the ok button --- cui/source/dialogs/about.cxx | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) (limited to 'cui/source/dialogs/about.cxx') diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 70648a01a662..0b0ae4ae0e0f 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -101,16 +101,18 @@ GetBuildId() AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : SfxModalDialog ( pParent, rId ), - - aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ), aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ), aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ), aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ), + aTdfLink ( this, ResId( ABOUT_TDFSTR_LINK, *rId.GetResMgr() ) ), + aFeaturesLink ( this, ResId( ABOUT_FEATURES_LINK, *rId.GetResMgr() ) ), aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())), m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())), m_aOracleCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT_ORACLE_DERIVED, *rId.GetResMgr())), m_aAcknowledgementTextStr(ResId(ABOUT_STR_ACKNOWLEDGEMENT, *rId.GetResMgr())), m_aLinkStr(ResId( ABOUT_STR_LINK, *rId.GetResMgr())), + m_aTdfLinkStr(ResId( ABOUT_TDF_LINK, *rId.GetResMgr())), + m_aFeaturesLinkStr(ResId( ABOUT_FEATURESSTR_LINK, *rId.GetResMgr())), m_sBuildStr(ResId(ABOUT_STR_BUILD, *rId.GetResMgr())) { // load image from module path @@ -152,12 +154,19 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : aInfoLink.SetBackground(); aInfoLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) ); + aTdfLink.SetURL(m_aTdfLinkStr); + aTdfLink.SetBackground(); + aTdfLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) ); + + aFeaturesLink.SetURL(m_aFeaturesLinkStr); + aFeaturesLink.SetBackground(); + aFeaturesLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) ); + Color aTextColor( rSettings.GetWindowTextColor() ); aVersionText.SetControlForeground( aTextColor ); aCopyrightText.SetControlForeground( aTextColor ); rtl::OUStringBuffer sText(m_aVendorTextStr); - sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n")); sal_uInt32 nCopyrightId = utl::ConfigManager::getProductName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("LibreOffice")) @@ -223,23 +232,31 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : nY += aCTSize.Height() + nCtrlMargin; + const int nLineSpace = 4; // FixedHyperlink with more info link - Size aLTSize = aInfoLink.CalcMinimumSize(); + Size aLTSize = aTdfLink.CalcMinimumSize(); Point aLTPnt; aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2; aLTPnt.Y() = nY; - aInfoLink.SetPosSizePixel( aLTPnt, aLTSize ); + aTdfLink.SetPosSizePixel( aLTPnt, aLTSize ); + + nY += aLTSize.Height(); - nY += aLTSize.Height() + nCtrlMargin; + aLTSize = aFeaturesLink.CalcMinimumSize(); + aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2; + aLTPnt.Y() = aLTPnt.Y() + aLTSize.Height() + nLineSpace; + aFeaturesLink.SetPosSizePixel( aLTPnt, aLTSize ); + + nY += aLTSize.Height() + nLineSpace; + + aLTSize = aInfoLink.CalcMinimumSize(); + aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2; + aLTPnt.Y() = aLTPnt.Y() + aLTSize.Height() + nSpace; + aInfoLink.SetPosSizePixel( aLTPnt, aLTSize ); - // OK-Button-Position (at the bottom and centered) - Size aOKSiz = aOKButton.GetSizePixel(); - Point aOKPnt; - aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2; - aOKPnt.Y() = nY; - aOKButton.SetPosPixel( aOKPnt ); + nY += aLTSize.Height() + nLineSpace; - nY += aOKSiz.Height() + nCtrlMargin; + nY += nCtrlMargin; aOutSiz.Height() = nY; -- cgit