Fix initial size of treectrl sample window in high DPI
Adjust it to the DPI as it was way too small at 200% scaling. Also stop passing parameters to MyFrame ctor, it's only used once so we can just as well hardcode them in it to simplify things a little.
This commit is contained in:
parent
233cca22e4
commit
bc4a99d3c4
2 changed files with 5 additions and 4 deletions
|
|
@ -193,7 +193,7 @@ bool MyApp::OnInit()
|
|||
return false;
|
||||
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame("wxTreeCtrl Test", 50, 50, 450, 600);
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
// Show the frame
|
||||
frame->Show(true);
|
||||
|
|
@ -203,8 +203,9 @@ bool MyApp::OnInit()
|
|||
|
||||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h)
|
||||
: wxFrame(nullptr, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)),
|
||||
MyFrame::MyFrame()
|
||||
: wxFrame(nullptr, wxID_ANY, "wxTreeCtrl test",
|
||||
wxDefaultPosition, FromDIP(wxSize(450, 600), nullptr)),
|
||||
m_treeCtrl(nullptr)
|
||||
#if wxUSE_LOG
|
||||
, m_textCtrl(nullptr)
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class MyFrame: public wxFrame
|
|||
{
|
||||
public:
|
||||
// ctor and dtor
|
||||
MyFrame(const wxString& title, int x, int y, int w, int h);
|
||||
MyFrame();
|
||||
virtual ~MyFrame();
|
||||
|
||||
// menu callbacks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue