← Back to team overview

kicad-developers team mailing list archive

Re: macOS GUI Quirks

 

Le 06/12/2017 à 17:40, Bernhard Stegmaier a écrit :
> Hi all,
> 
> as some of might know, I am working on macOS and some things seem to work a bit different there (wrt KiCad).
> During my last project I came across some dialogs, widgets, etc. where initial sizing is not correct (so, not all content is shown), etc.
> Mostly no real showstoppers, but leaves a very unprofessional impression…
> 
> I will try to reproduce those I can remember and try to fix them.
> I guess most of them only need some wisely placed Layout(), etc. calls to fix.
> 
> So, is there any document, guidelines, dos and don’ts, etc. how to achieve maximum compatibility/portability with wx?
> Something like “place a Layout() at end of each dialog constructor”?
> 
> Of course, I don’t want to fix things on macOS and break it on Linux/Windows…
> 
> 
> Regards,
> Bernhard

Hi Bernhard,

Most of our dialogs are (or should be) derived from DIALOG_SHIM class.

You should have a look at:
void DIALOG_SHIM::FinishDialogSettings()

that is (or should be) called in each dialog, and see if adding the call to Layout() fix these issues.

The call to Layout() should be automatically made be wxWidgets, so I am not sure adding the call to
Layout() fix issues, but it should not break Windows and Linux builds when explicitly calling it (it
will be just called twice).

Some dialogs use TransferDataToWindow() to initialize data in dialogs (this is the right way to
initialize user data), so perhaps Layout() must be called from this method.


-- 
Jean-Pierre CHARRAS


References