Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
zh-cn:howto:xfwm4_theme [2013/04/21 11:29] – [GTK 颜色 pickup] haobug | zh-cn:howto:xfwm4_theme [2013/04/21 12:31] – [Conclusion] haobug | ||
---|---|---|---|
Line 105: | Line 105: | ||
'' | '' | ||
- | ===== GTK 颜色 | + | ===== 借用 |
- | 你肯定已经注意到,当使用安装 xfwm4 的默认主题,主题可以 “pick-up” GTK 主题颜色。不只是运行 GIMP 然后画按钮。大多数主题使用颜色符号表。这意味着 xpm 文件,必须能手工打开编辑。 | + | 你肯定已经注意到,当使用安装 xfwm4 的默认主题,主题可以“借用” GTK 主题颜色。不只是运行 GIMP 然后画按钮。大多数主题使用颜色符号表。这意味着 xpm 文件,必须能手工打开编辑。 |
颜色符号表如下: | 颜色符号表如下: | ||
Line 135: | Line 135: | ||
+ | ===== 维基百科,自由的百科全书 ===== | ||
+ | XPM(X PixMap)是一种 X Window 系统使用的 ASCII 图像格式。它由法国 Inria 实验室的 Daniel Dardailler 和 Colas Nahaboo 创建于 1989 年,随后由 Arnaud Le Hors 改进。其主要目的是为创建图标和支持透明色。它结构简单,源于早前 XBM 语法。可以用任何文本编辑器创建和编辑,并可以被包含在一个用 C 语言的文件中。 | ||
- | ===== From Wikipedia, the free encyclopedia. ===== | + | 因此,如果用你喜欢的文本编辑器打开的 |
- | XPM (X PixMap) is an ASCII image format used by the X Window System. It was created in 1989 by Daniel Dardailler and Colas Nahaboo working in Inria Laboratories, | + | |
- | + | ||
- | Therefore, if you open an xpm file with your favorite text editor, you'll see something like this: | + | |
/* XPM */ | /* XPM */ | ||
Line 176: | Line 175: | ||
" | " | ||
- | Not going too deep into the details of the XPM format, an XPM image is made of different sections, the values that describe the format of the image, the colors that compose the image, the pixels (and there is also the extensions, but it's safe to ignore them for now) | + | 不要过深关注 |
- | A character is assigned to each color of the image (if the image has more colors than available charaters, then more than a single character can be assiged to a colors). | + | 每一种图像的颜色分配一个字符(如果图像具有超过可用的字符的颜色,则分配多个字符给一种颜色)。如果指定了颜色符号,指定的颜色将被忽略,并且被给定的颜色符号表中相应的颜色替换。 |
- | To get the gtk colors applied to your theme, you need to edit the XPM files and add the proper color symbols to the color definition table. | + | 要应用 GTK 颜色到你的主题,你需要编辑 |
" | " | ||
Line 193: | Line 192: | ||
" | " | ||
- | must be changed to | + | 必须修改为 |
" | " | ||
Line 206: | Line 205: | ||
" | " | ||
- | As a matter of fact, " | + | 事实上," |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===== Xfwm 4.2 new functionality ===== | + | |
- | As simple as it is, the color symbol replacement table of the XPM format is not powerfull enough to achive the nice color gradients seen in most recent themes. | + | |
- | + | ||
- | Xfwm 4.2 includes yet another functionality that gives real nice result while being still compatible with the previous theme format: It composes the final image from the XPM file and it colors replacement table, and another PNG file with transparency, | + | |
- | {{ howto: | + | ===== Xfwm 4.2 新功能 ===== |
+ | 由于格式简单,XPM 颜色的符号替换表不是很强大,不足以展现在新近的主题中的漂亮的颜色渐变。 | ||
- | The names of the PNG files are identical to the names of the corresponding XPM files, with the ".png" file extension (ie title-1-active.png, | + | 所以 Xfwm 4.2 包括另一项功能,在仍然与以前的主题格式兼容的情况下取得更好的效果:从XPM 文件和它的颜色替换表,及另一个具有透明效果的 |
- | This technique has several advantages: | + | 图像上获得分层XPM图像的顶部 |
+ | {{ howto:xfwm4: | ||
- | * It's fairly simple from a theme designer point of view, most people are working with similar techniques when composing themes with tools such as [[http:// | + | PNG 文件的文件名和相应的 XPM 文件的文件名相同,以 “PNG” 为扩展名(即 title-1-active.png 的,top-right-inactive.png 等等)。PNG 文件不是必须的,如果它不存在,xfwm4 won't complain,但如果有一个 |
- | * It's backward compatible with xfwm4 from Xfce 4.0, the PNG files are just ignored by xfwm4 4.0. | + | |
+ | 这种技术有几个优点: | ||
+ | * 从主题设计者的角度来看,这相当简单的,大多数人在用工具(比如 [[http:// | ||
+ | * 这是向后兼容 Xfce4.0 xfwm4 的,xfwm4 4.0 会直接忽略 PNG 文件。 | ||
- | ===== Conclusion | + | ===== 结语 |
- | I hope this small " | + | |
- | you can also find xfce theme at [[http:// | + | 我希望这条创建 xfwm4 主题的 “how-to” 能帮助你设计自己的主题。如果你能在 |
+ | 您还可以在 [[http:// | ||
===== List of frame and button part names ===== | ===== List of frame and button part names ===== | ||