Large buttons in OSX?

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
SamCam
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Nov 30, 2020 2:23 pm

Large buttons in OSX?

Post by SamCam »

Hey gang, it's a been a while, I hope you are all well :-)

I believe I can guess the answer to this, however is the y size (or height) of buttons adjustable in OSX?

Here is the code running to create the buttons which is the same on both MSW and OSX :

Code: Select all

        sizer0 = new wxBoxSizer(wxVERTICAL);
	sizer2 = new wxBoxSizer(wxHORIZONTAL);
	sizer2->Add(btn0, 1, wxEXPAND | wxALL, 5); // small text button
	sizer2->Add(btn1, 1, wxEXPAND | wxALL, 5); // large text button
	sizer0->Add(sizer2, 5, wxEXPAND | wxALL, 0); // sizer for buttons
	sizer0->Add(txt0,20, wxEXPAND | wxALL, 5);
	sizer0->Add(terminalWindow, 5, wxEXPAND | wxALL, 5);
	sizer0->SetSizeHints(this);
	SetSizer(sizer0);
And here is the output on each:
OSX screenshot.png
OSX screenshot.png (36.27 KiB) Viewed 4066 times
Screenshot 2021-08-16 221622.png
Screenshot 2021-08-16 221622.png (12.53 KiB) Viewed 4066 times
User avatar
doublemax@work
Super wx Problem Solver
Super wx Problem Solver
Posts: 474
Joined: Wed Jul 29, 2020 6:06 pm
Location: NRW, Germany

Re: Large buttons in OSX?

Post by doublemax@work »

As OSX is quite restrictive when it comes to GUI design, i wouldn't be surprised if they just ignore the height. Try creating a single button on a panel, without sizers, but absolute position and size and check if it obeys the given height.
Post Reply