Proposal: Cairo-based, cross-desktop/toolkit theme engine API.

洪任諭 at
Thu Apr 17 06:06:15 PDT 2008

Hi all,
For a long time, It's quite annoying that gtk+ applications always
look like alien under KDE, and vice versa. The gtk+-qt theme engine
"partially" solve this, but this is not enough.
Configurations like double-click time, colors, and fonts can be make
cross-desktop through XSETTINGS spec. Besides, preferred applications
are solved with xdg-utils by Portland project. So the behavior of
applications developed with different toolkits for different desktop
environments will be similiar in the future. However, the theming
problem cannot be solved via current available approach. To get
consistent look and feel, here is a proposal.

The architecture of gtk+ theme and qt theme are quite different, and
both are complicated.
Writing theme engines supporting both are quite difficult. Currently
qtcurve does this well, but there are still some problems. Drawing
gtk+ widgets with Qt is already possilble, but this is a dirty hack.
Some themes don't work properly this way, either. So a common theming
API encapsulating the toolkit specific details is required.

We already have a nice croass-toolkit/cross-platform drawing API - Cairo.
So, why not create a new set of theming API based on Cairo?

The authors of theme only need to focus on the art and design, not the
underlying details.
All drawing should be done through cairo API, and then no
toolkit-specific drawing API is required. In this way, developing a
cross-toolkit theming engine is possible.

What do you think?

More information about the xdg mailing list