Proposal to use Qocoa to support native-look widgets on different platform

Yuƫ Liu yue.liu at mail.com
Sun Mar 10 16:49:19 GMT 2013


Hi,

Currently Calligra looks ugly on OS X because many qt widgets don't
have good styles for OS X, to get pixel perfection, we have to wrap
native widgets in Qt codes. But adding ifdefs is uglier than this, so
we better use small library who has done the wrapping work. Qocoa is
for this.
https://github.com/mikemcquaid/Qocoa#readme

Qocoa wrapped mac native widgets into qt widgets like qbutton,
qsearchfield, then we use these widgets instead of QToolButton, etc.,
and for non-mac platform these widgets will fallback to normal qt
widgets, for example qbutton fallback to qpushbutton or qtoolbutton
depending on whether the button is inside toolbar.

If we change all the qt widgets having bad look on mac with qocoa
widgets, we'll have perfect osx look and feel, and other platform
won't be hampered since there are fallbacks. Many qt applications
already using Qocoa for better mac integration, such as Clementine
player.

To use Qocoa widgets, first we have to check what qt widgets need to
be replaced by qocoa widgets, what mac native widgets is needed but
not included in Qocoa, what homebrew widgets (such as KoGroupButton)
can be ported to Qocoa; then we can extend Qocoa to add more needed
mac native widgets and our homebrew widgets; finally we include
modified Qocoa and replace uses of normal qt widgets with uses of
qocoa widgets.

What's your opinion on this? At leaset we need all the application
maintainers' support.

Thanks,
Yue Liu



More information about the calligra-devel mailing list