fixed centering of top level windows on secondary displays (replaces patch 1267173)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -332,15 +332,11 @@ public:
|
||||
// the generic centre function - centers the window on parent by`
|
||||
// default or on screen if it doesn't have parent or
|
||||
// wxCENTER_ON_SCREEN flag is given
|
||||
void Centre( int direction = wxBOTH );
|
||||
void Center( int direction = wxBOTH ) { Centre(direction); }
|
||||
|
||||
// centre on screen (only works for top level windows)
|
||||
void CentreOnScreen(int dir = wxBOTH) { Centre(dir | wxCENTER_ON_SCREEN); }
|
||||
void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); }
|
||||
void Centre(int dir = wxBOTH) { DoCentre(dir); }
|
||||
void Center(int dir = wxBOTH) { DoCentre(dir); }
|
||||
|
||||
// centre with respect to the the parent window
|
||||
void CentreOnParent(int dir = wxBOTH) { Centre(dir | wxCENTER_FRAME); }
|
||||
void CentreOnParent(int dir = wxBOTH) { DoCentre(dir); }
|
||||
void CenterOnParent(int dir = wxBOTH) { CentreOnParent(dir); }
|
||||
|
||||
// set window size to wrap around its children
|
||||
@@ -1295,6 +1291,11 @@ protected:
|
||||
// arrange themselves inside the given rectangle
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height) = 0;
|
||||
|
||||
// centre the window in the specified direction on parent, note that
|
||||
// wxCENTRE_ON_SCREEN shouldn't be specified here, it only makes sense for
|
||||
// TLWs
|
||||
virtual void DoCentre(int dir);
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
Reference in New Issue
Block a user