Use sizers in the notebook sample for better DPI change handling
Even simple static texts need to be put inside sizers to allow them to update their size when the DPI changes, as they remain too small for the new (higher) DPI otherwise when the sample window is moved from a standard to high DPI monitor. See #23088.
This commit is contained in:
parent
00c541934d
commit
b1bdb95ee8
1 changed files with 11 additions and 6 deletions
|
|
@ -114,9 +114,11 @@ wxPanel *CreateVetoPage(wxBookCtrlBase *parent)
|
|||
panel->SetHelpText("An empty panel");
|
||||
#endif
|
||||
|
||||
(void) new wxStaticText( panel, wxID_ANY,
|
||||
"This page intentionally left blank",
|
||||
wxPoint(10, 10) );
|
||||
wxSizer* const s = new wxBoxSizer(wxVERTICAL);
|
||||
s->Add(new wxStaticText( panel, wxID_ANY,
|
||||
"This page intentionally left blank" ),
|
||||
wxSizerFlags().Expand().DoubleBorder());
|
||||
panel->SetSizer(s);
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
|
@ -143,9 +145,12 @@ wxPanel *CreateInsertPage(wxBookCtrlBase *parent)
|
|||
#endif
|
||||
|
||||
panel->SetBackgroundColour( wxColour( "MAROON" ) );
|
||||
(void) new wxStaticText( panel, wxID_ANY,
|
||||
"This page has been inserted, not added.",
|
||||
wxPoint(10, 10) );
|
||||
|
||||
wxSizer* const s = new wxBoxSizer(wxVERTICAL);
|
||||
s->Add(new wxStaticText( panel, wxID_ANY,
|
||||
"This page has been inserted, not added." ),
|
||||
wxSizerFlags().Expand().DoubleBorder());
|
||||
panel->SetSizer(s);
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue