Hide wxSTC popup when the DPI changes
After a DPI change, the position of the popup is wrong. It is not shown at the cursor position anymore. The correct size and position are calculated by scintilla, and there is no easy way to access this without modifying scintilla sources.
This commit is contained in:
@@ -5446,6 +5446,13 @@ void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) {
|
||||
{
|
||||
SetMarginWidth(i, (int)wxMulDivInt32(GetMarginWidth(i), evt.GetNewDPI().y, evt.GetOldDPI().y));
|
||||
}
|
||||
|
||||
// Hide auto-complete popup, there is no (easy) way to set it to the correct size
|
||||
// and position
|
||||
if ( AutoCompActive() )
|
||||
{
|
||||
AutoCompCancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -973,6 +973,13 @@ void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) {
|
||||
{
|
||||
SetMarginWidth(i, (int)wxMulDivInt32(GetMarginWidth(i), evt.GetNewDPI().y, evt.GetOldDPI().y));
|
||||
}
|
||||
|
||||
// Hide auto-complete popup, there is no (easy) way to set it to the correct size
|
||||
// and position
|
||||
if ( AutoCompActive() )
|
||||
{
|
||||
AutoCompCancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user