Create a wxDisplay directly from wxWindow
This commit is contained in:
@@ -2285,9 +2285,6 @@ void wxComboCtrlBase::ShowPopup()
|
|||||||
|
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
|
||||||
int displayIdx = wxDisplay::GetFromWindow(this);
|
|
||||||
wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
|
||||||
|
|
||||||
// Space above and below
|
// Space above and below
|
||||||
int screenHeight;
|
int screenHeight;
|
||||||
wxPoint scrPos;
|
wxPoint scrPos;
|
||||||
@@ -2296,6 +2293,7 @@ void wxComboCtrlBase::ShowPopup()
|
|||||||
int maxHeightPopup;
|
int maxHeightPopup;
|
||||||
wxSize ctrlSz = GetSize();
|
wxSize ctrlSz = GetSize();
|
||||||
|
|
||||||
|
wxRect displayRect = wxDisplay(this).GetGeometry();
|
||||||
screenHeight = displayRect.GetHeight();
|
screenHeight = displayRect.GetHeight();
|
||||||
scrPos = GetScreenPosition();
|
scrPos = GetScreenPosition();
|
||||||
|
|
||||||
|
@@ -1716,8 +1716,7 @@ wxPoint wxPropertyGrid::GetGoodEditorDialogPosition( wxPGProperty* p,
|
|||||||
|
|
||||||
ImprovedClientToScreen( &x, &y );
|
ImprovedClientToScreen( &x, &y );
|
||||||
|
|
||||||
int displayIdx = wxDisplay::GetFromWindow(this);
|
wxRect displayRect = wxDisplay(this).GetGeometry();
|
||||||
wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
|
||||||
|
|
||||||
x -= displayRect.GetX();
|
x -= displayRect.GetX();
|
||||||
y -= displayRect.GetY();
|
y -= displayRect.GetY();
|
||||||
|
Reference in New Issue
Block a user