[Development] extending the cocoa native style via a plugin: feasible?

René J.V. Bertin rjvbertin at gmail.com
Tue Dec 1 14:21:54 CET 2015


A few images to replace a few thousands words more ;)

I'm not yet at the point where I can build more complex KF5 applications, so I'm using Qt Creator as a source of examples; it's actually one of the Qt applications that I feel would benefit from a more compact design.

The pure, native OS X theme/style:
https://git.reviewboard.kde.org/media/uploaded/files/2015/11/30/650d0da7-52b3-40d1-a1f9-cb610494cf77__Screen_Shot_2015-11-30_at_15.42.31.png

Same dialog and part of the main UI using the KDEPlatformPlugin and the QtCurve theme+palette hand-tuned for best integration with native applications. This serves as a reference for the selected fonts and colours that should be used.
https://git.reviewboard.kde.org/media/uploaded/files/2015/11/30/309e5995-74fa-42fb-a6f3-936cedbf5246__Screen_Shot_2015-11-30_at_15.43.31.png

Same dialog using the KDEPlatformPlugin and the native "macintosh" theme:
https://git.reviewboard.kde.org/media/uploaded/files/2015/12/01/de55a91f-3500-4db8-8a3b-d252fd7ea169__Screen_Shot_2015-12-01_at_13.52.35.png

That 3rd image is of course representative of what a user would get who installs KF5 for the first time, and doesn't use systemsettings5 (nor a kdeglobals file from his/her Linux desktop). It's almost what I would expect from a plugin that extends the native plugin with support for different fonts/font roles, palettes and icon sets without otherwise changing widget appearance.
The interface doesn't become noticeably more compact, but that's because the application itself imposes a minimum size on certain of its elements without taking the actual content dimensions into account.

There are a couple of clear errors that can be seen:
- Frame headings ("Tabs and Indentation", "Typing" etc) use a small, regular version of what appears to be Lucida Grande. Idem in the 1st screenshot. That is *not* hardcoded in Qt Creator, because the 2nd screenshot shows what really ought to be used here.
- The tab sheet selection widget uses the system default font in tabs that are not selected, but apparently uses the requested font to determine the widget widths. This widget also is really showing its age, but that's a different topic (Xcode uses a version that looks like a simple toolbars with just the text, no shapes).

This would be issues to address in Qt's code, because that's the code being used...


Yeah, those fonts are way different from the usual Lucida Grande :) I actually prefer a moderate serif font like this (in "Medium") but its main function in these images is to make it easy to see when the default system font (or style or weight) is used instead of the requested font.


R



More information about the Development mailing list