Skip all wxDPIChangedEvent

So base classes will process the event too.
This is need for (at least) wxGenericColourButton It has its own handler,
but also needs to handle the DPI event in wxButtonImageData.
This commit is contained in:
Maarten Bent
2022-01-05 22:47:32 +01:00
parent 0f8ab824a3
commit e2d34e982e
13 changed files with 33 additions and 7 deletions

View File

@@ -2384,9 +2384,11 @@ void wxAuiToolBar::OnIdle(wxIdleEvent& evt)
evt.Skip();
}
void wxAuiToolBar::OnDPIChanged(wxDPIChangedEvent& WXUNUSED(event))
void wxAuiToolBar::OnDPIChanged(wxDPIChangedEvent& event)
{
Realize();
event.Skip();
}
void wxAuiToolBar::UpdateWindowUI(long flags)

View File

@@ -120,10 +120,12 @@ void wxGenericColourButton::OnColourChanged(wxColourDialogEvent& ev)
parent->ProcessWindowEvent(event);
}
void wxGenericColourButton::OnDPIChanged(wxDPIChangedEvent&WXUNUSED(event))
void wxGenericColourButton::OnDPIChanged(wxDPIChangedEvent& event)
{
m_bitmap = wxBitmap(FromDIP(defaultBitmapSize));
UpdateColour();
event.Skip();
}
void wxGenericColourButton::UpdateColour()

View File

@@ -278,13 +278,15 @@ void wxGenericColourDialog::OnPaint(wxPaintEvent& WXUNUSED(event))
PaintHighlight(dc, true);
}
void wxGenericColourDialog::OnDPIChanged(wxDPIChangedEvent& WXUNUSED(event))
void wxGenericColourDialog::OnDPIChanged(wxDPIChangedEvent& event)
{
CalculateMeasurements();
#if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA
CreateCustomBitmaps();
#endif
event.Skip();
}
void wxGenericColourDialog::CalculateMeasurements()

View File

@@ -5682,6 +5682,8 @@ void wxDataViewCtrl::OnDPIChanged(wxDPIChangedEvent& event)
width = event.ScaleX(width);
m_cols[i]->SetWidth(width);
}
event.Skip();
}
void wxDataViewCtrl::SetFocus()

View File

@@ -108,9 +108,11 @@ void wxVListBoxComboPopup::SetFocus()
#endif
}
void wxVListBoxComboPopup::OnDPIChanged(wxDPIChangedEvent& WXUNUSED(event))
void wxVListBoxComboPopup::OnDPIChanged(wxDPIChangedEvent& event)
{
m_itemHeight = m_combo->GetCharHeight();
event.Skip();
}
bool wxVListBoxComboPopup::LazyCreate()

View File

@@ -1200,9 +1200,11 @@ void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) )
LayoutControls();
}
void wxSearchCtrl::OnDPIChanged(wxDPIChangedEvent &WXUNUSED(event))
void wxSearchCtrl::OnDPIChanged(wxDPIChangedEvent &event)
{
RecalcBitmaps();
event.Skip();
}
#if wxUSE_MENUS

View File

@@ -467,6 +467,8 @@ void wxListCtrl::OnDPIChanged(wxDPIChangedEvent &event)
SetColumnWidth(i, event.ScaleX(width));
}
event.Skip();
}
bool wxListCtrl::IsDoubleBuffered() const

View File

@@ -654,6 +654,8 @@ void wxSlider::OnDPIChanged(wxDPIChangedEvent& event)
int thumbLen = GetThumbLength();
SetThumbLength(event.ScaleX(thumbLen));
event.Skip();
}
// ----------------------------------------------------------------------------

View File

@@ -1992,6 +1992,8 @@ void wxToolBar::OnDPIChanged(wxDPIChangedEvent& event)
// there are still minor but visible cosmetic problems when moving the
// toolbar from 125% to 175% display.
CallAfter(&wxToolBar::RealizeHelper);
event.Skip();
}
bool wxToolBar::HandleSize(WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam))

View File

@@ -1360,11 +1360,13 @@ void wxPropertyGrid::OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event
}
}
void wxPropertyGrid::OnDPIChanged(wxDPIChangedEvent &WXUNUSED(event))
void wxPropertyGrid::OnDPIChanged(wxDPIChangedEvent &event)
{
m_vspacing = FromDIP(wxPG_DEFAULT_VSPACING);
CalculateFontAndBitmapStuff(m_vspacing);
Refresh();
event.Skip();
}
// -----------------------------------------------------------------------

View File

@@ -2940,7 +2940,7 @@ void wxSTCListBox::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
GetParent()->Refresh();
}
void wxSTCListBox::OnDPIChanged(wxDPIChangedEvent& WXUNUSED(event))
void wxSTCListBox::OnDPIChanged(wxDPIChangedEvent& event)
{
m_imagePadding = FromDIP(1);
m_textBoxToTextGap = FromDIP(3);
@@ -2950,6 +2950,8 @@ void wxSTCListBox::OnDPIChanged(wxDPIChangedEvent& WXUNUSED(event))
GetTextExtent(EXTENT_TEST, &w, &m_textHeight);
RecalculateItemHeight();
event.Skip();
}
void wxSTCListBox::OnMouseLeaveWindow(wxMouseEvent& event)

View File

@@ -5450,6 +5450,8 @@ void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) {
{
AutoCompCancel();
}
evt.Skip();
}

View File

@@ -977,6 +977,8 @@ void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) {
{
AutoCompCancel();
}
evt.Skip();
}