简介
关于 GTK+ 的主题引擎 (theme engine),目前有 gtk-css-engine ,基于 CSS 的主题引擎;还有一个是 SVG theme engine,基于 SVG 的主题
引擎,它们有什么区别呢,看看 gtk-css-engine 的作者 Robert Staudinger 的描述。
两个引擎的对比
The Manju project (svg theme engine) aims at creating graphical widget toolkit themes
from SVG files in a toolkit independent fashion. It combines the idea
of a pixmap theme engine, Jimmac's "One Canvas Workflow", SVG markup
features and Inkscape export functionality to fully automate the
creation of a scalable and stretchable pixmap theme from an SVG
source.
AFAIK Manju is generating a binary theme package [2, 3], from a single
SVG file. There is a naming spec for svg elements in place , so the
package generation tool can create PNGs from the theme components.
The CSS engine was born out of desire for a more powerful non-code
theming approach. There is a small enhancement patch against librsvg
in the works, once that's in it's just as well possible to design
themes in a single SVG canvas. Manju is exporting theme parts at
specific sizes to avoid ugly scaling effects, this is not needed in
the CSS engine because it relies on CSS-defined borders and will
support border-images in the future.
Unlike manju, "GCE" (the gtk-css-engine) did initially focus on
delivering a gtk-oriented solution, but work is now underway to add
support for clutter and clutter's "Tidy" toolkit to the spun-off
"libccss" .
To the best of my knowledge it is not yet possible to use a manu-based
theme, there is no engine yet. On the other hand it is very well
possible to test CSS engine themes in "TheWidgetFactory" , the
upcoming release will be usable desktop wide.
It would probably be possible to use manju-created themes with GCE,
either by changing manju's theme creation process, or by changing the
way how themes are loaded in GCE, but I do currently not see any
advantage in using a binary theme package. On the contrary, the
"CSS-with-single-pixmaps/SVGs" approach lends itself very well to
rapid protoyping.
Resources
|