Jonatan
Jonatan

Reputation: 3992

Default font sizes with wxWidgets on OSX

I've noticed that my wxWidgets application does not follow the native font sizes on OSX. They are typically too big and also the same font size is used for all widgets, which does not seem to be the case by native default.

I've tried to handle this myself by applying fonts to the top level windows. I've used TinkerTool to read the defaults (should be done automatically of course) and create corresponding fonts, for example using wxFont(wxFontInfo(12).FontName("Helvetica") but it does not render the same as other, native applications.

Does anyone know of a good method to handle this?

Upvotes: 1

Views: 986

Answers (1)

VZ.
VZ.

Reputation: 22753

I don't know of any examples when wxWidgets controls don't use the same fonts as the native controls, please report any occurrences of this as bugs in the wxWidgets Trac, especially if this is using 2.9.4 (old 2.8 versions use Carbon and are hopeless on modern OS X anyhow). But without any concrete examples I can't really help with this.

As for the font sizes, I think you might be looking for wxWindow::SetWindowVariant() which allows to use smaller versions of the controls which is rather common in OS X UI.

Upvotes: 3

Related Questions