Desktop Theme Spec
洪任諭
pcman.tw at gmail.com
Sun Apr 20 10:58:48 PDT 2008
2008/4/21, Olivier Goffart <ogoffart at kde.org>:
> Le samedi 19 avril 2008, dan_500 at web.de a écrit :
>
> Actually, you can use any KDE or Qt theme in Gtk with the gtk-qt theme engine
> http://gtk-qt.ecs.soton.ac.uk
>
> And It is verry possible to write the opposite (a Qt style that use the gtk
> styles)
>
> (And i wonder what would happen if you use both two in the same time :-))
No, this is not true.
Due to some major differences among their infrastructures, drawing Qt
widgets with gtk+ theme is almost impossible. I have tried this
before, but I found it impossible.
The paint device of Qt can be anything it supports while gtk+ only
recognizes cairo and X11 drawable. Besides, the underlying pixmap is
not exposed by Qt, so copying the content
of a paint device in Qt to gdk drawable is nearly impossible. Doing
this with dirty hacks
can only result in segfaults. However, I guess you know much more on
KDE/Qt than me.
So, maybe you can try it yourself, but it's highly possible that you'll fail.
That's why I propose creating a set of common cairo-based API for
themes previously on this mailing list. We can build a KDE/Qt style
supporting this set of cairo-based API, and also create a special GTK+
theme engine using it. Then, the theme creators only need to write one
plugin for those two theme engines with cairo and the common theme
API. All communications with the both toolkits are done by the special
theme engines, and no toolkit specific stuff will be used by the theme
creators.
Cairo, IMHO, is the best choice since it can work with both GTK+ and
Qt, and provides all painting tools needed by modern systems.
Anyone want to do this? Can we start a new project together?
More information about the xdg
mailing list