Kaydet (Commit) e0626ada authored tarafından Petr Mladek's avatar Petr Mladek

add back close button to the about dialog

Some windowmanagers on small devides do not have the close window button,
so all dialogs should have its own way how to diappear.

It is now done like in other application. They use "Close" button instead
of "OK". They put it into the right side and delimit it by a line, so
it looks like another dialog in the application.
üst 43aa1115
...@@ -105,6 +105,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : ...@@ -105,6 +105,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ), aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ),
aTdfLink ( this, ResId( ABOUT_TDFSTR_LINK, *rId.GetResMgr() ) ), aTdfLink ( this, ResId( ABOUT_TDFSTR_LINK, *rId.GetResMgr() ) ),
aFeaturesLink ( this, ResId( ABOUT_FEATURES_LINK, *rId.GetResMgr() ) ), aFeaturesLink ( this, ResId( ABOUT_FEATURES_LINK, *rId.GetResMgr() ) ),
aButtonsLine ( this, ResId( ABOUT_BUTTONS_LINE, *rId.GetResMgr() ) ),
aCancelButton ( this, ResId( ABOUT_BTN_CANCEL, *rId.GetResMgr() ) ),
aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())), aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())),
m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())), m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())),
m_aOracleCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT_ORACLE_DERIVED, *rId.GetResMgr())), m_aOracleCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT_ORACLE_DERIVED, *rId.GetResMgr())),
...@@ -254,9 +256,26 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : ...@@ -254,9 +256,26 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aLTPnt.Y() = aLTPnt.Y() + aLTSize.Height() + nLineSpace; aLTPnt.Y() = aLTPnt.Y() + aLTSize.Height() + nLineSpace;
aInfoLink.SetPosSizePixel( aLTPnt, aLTSize ); aInfoLink.SetPosSizePixel( aLTPnt, aLTSize );
nY += aLTSize.Height() + nLineSpace; nY += aLTSize.Height();
// buttons delimiter line
Size aBDSize = aButtonsLine.GetSizePixel();
aBDSize.Width() = aOutSiz.Width();
Point aBDPnt;
aBDPnt.X() = 0;
aBDPnt.Y() = nY + nCtrlMargin / 2 + aBDSize.Height() / 2;
aButtonsLine.SetPosSizePixel( aBDPnt, aBDSize );
nY += nCtrlMargin + aBDSize.Height();
// Cancel-Button-Position (at the bottom and in the right)
Size aCancelSiz = aCancelButton.GetSizePixel();
Point aCancelPnt;
aCancelPnt.X() = aOutSiz.Width() - aCancelSiz.Width() - nDlgMargin / 2;
aCancelPnt.Y() = nY;
aCancelButton.SetPosPixel( aCancelPnt );
nY += nCtrlMargin; nY += aCancelSiz.Height() + nCtrlMargin / 2;
aOutSiz.Height() = nY; aOutSiz.Height() = nY;
......
...@@ -42,3 +42,5 @@ ...@@ -42,3 +42,5 @@
#define ABOUT_STR_LINK 13 #define ABOUT_STR_LINK 13
#define ABOUT_TDF_LINK 14 #define ABOUT_TDF_LINK 14
#define ABOUT_FEATURESSTR_LINK 15 #define ABOUT_FEATURESSTR_LINK 15
#define ABOUT_BUTTONS_LINE 16
#define ABOUT_BTN_CANCEL 17
...@@ -121,4 +121,15 @@ ModalDialog RID_DEFAULTABOUT ...@@ -121,4 +121,15 @@ ModalDialog RID_DEFAULTABOUT
{ {
Text[ en-US ] = "http://www.libreoffice.org/features/"; Text[ en-US ] = "http://www.libreoffice.org/features/";
}; };
FixedLine ABOUT_BUTTONS_LINE
{
Pos = MAP_APPFONT ( 0 , 245 ) ;
Size = MAP_APPFONT ( 170 , 2 ) ;
};
CancelButton ABOUT_BTN_CANCEL
{
DefButton = TRUE ;
Pos = MAP_APPFONT ( 174 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
}; };
...@@ -52,6 +52,8 @@ private: ...@@ -52,6 +52,8 @@ private:
svt::FixedHyperlink aInfoLink; svt::FixedHyperlink aInfoLink;
svt::FixedHyperlink aTdfLink; svt::FixedHyperlink aTdfLink;
svt::FixedHyperlink aFeaturesLink; svt::FixedHyperlink aFeaturesLink;
FixedLine aButtonsLine;
CancelButton aCancelButton;
String aVersionData; String aVersionData;
String aVersionTextStr; String aVersionTextStr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment