Update tab control height in wxAuiNotebook on DPI change
Otherwise layout is computed incorrectly, resulting in visual artefacts. Closes #24348. Closes #24355.
This commit is contained in:
parent
8a027b98d1
commit
9bae1046c7
2 changed files with 8 additions and 0 deletions
|
|
@ -434,6 +434,7 @@ protected:
|
|||
void OnTabBgDClick(wxAuiNotebookEvent& evt);
|
||||
void OnNavigationKeyNotebook(wxNavigationKeyEvent& event);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
void OnDpiChanged(wxDPIChangedEvent& event);
|
||||
|
||||
// set selection to the given window (which must be non-null and be one of
|
||||
// our pages, otherwise an assert is raised)
|
||||
|
|
|
|||
|
|
@ -1700,6 +1700,7 @@ wxBEGIN_EVENT_TABLE(wxAuiNotebook, wxBookCtrlBase)
|
|||
wxAuiNotebook::OnTabBgDClick)
|
||||
EVT_NAVIGATION_KEY(wxAuiNotebook::OnNavigationKeyNotebook)
|
||||
EVT_SYS_COLOUR_CHANGED(wxAuiNotebook::OnSysColourChanged)
|
||||
EVT_DPI_CHANGED(wxAuiNotebook::OnDpiChanged)
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
void wxAuiNotebook::OnSysColourChanged(wxSysColourChangedEvent &event)
|
||||
|
|
@ -1723,6 +1724,12 @@ void wxAuiNotebook::OnSysColourChanged(wxSysColourChangedEvent &event)
|
|||
Refresh();
|
||||
}
|
||||
|
||||
void wxAuiNotebook::OnDpiChanged(wxDPIChangedEvent& event)
|
||||
{
|
||||
UpdateTabCtrlHeight();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxAuiNotebook::Init()
|
||||
{
|
||||
m_curPage = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue