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/01/20 14:00] – haobug | zh-cn:howto:xfwm4_theme [2013/04/21 12:37] – [按钮和 frame 部件的名称列表] haobug | ||
---|---|---|---|
Line 101: | Line 101: | ||
- | ==== Button offset and spacing | + | ==== 按钮偏移和间距 |
- | Simlilarily, | + | 同样地,可以通过使用“按钮偏移量”设置按钮的水平移动。这没有什么用,偏移值是相对的应用程序窗口的边框的,而不是 |
- | The "button_spacing" value gives the number of pixels between each button. | + | '' |
+ | ===== 借用 GTK 颜色 | ||
+ | 你肯定已经注意到,当使用安装 xfwm4 的默认主题,主题可以“借用” GTK 主题颜色。不只是运行 GIMP 然后画按钮。大多数主题使用颜色符号表。这意味着 xpm 文件,必须能手工打开编辑。 | ||
- | ===== Gtk Color pickup ==== | + | 颜色符号表如下: |
- | As you have no doubt noticed when using Xfwm4' | + | ^ 名称 ^ 描述 ^ |
+ | | active_text_color | 激活窗口的标题文本颜色 | | ||
+ | | inactive_text_color | 非激活窗口的标题文本颜色 | | ||
+ | | active_border_color | 很少使用,一般设置为黑色 | | ||
+ | | inactive_border_color | 同上 | | ||
+ | | active_color_1 | 激活标题的背景颜色 | | ||
+ | | active_color_2 | 激活窗口的背景颜色 | | ||
+ | | active_hilight_1 | 激活标题的浅颜色,表现 3D 样式 | | ||
+ | | active_hilight_2 | 激活窗口的浅颜色 | | ||
+ | | active_mid_1 | 激活标题的深一点的颜色 | | ||
+ | | active_mid_2 | 激活窗口的深一点的颜色 | | ||
+ | | active_shadow_1 | 激活标题的深颜色,表现 3D 样式 | | ||
+ | | active_shadow_2 | 激活窗口的深颜色 | | ||
+ | | inactive_color_1 | 非激活标题的背景颜色| | ||
+ | | inactive_color_2 | 非激活窗口的背景颜色 | | ||
+ | | inactive_hilight_1 | 非激活标题的浅颜色,表现 3D 样式 | | ||
+ | | inactive_hilight_2 | 非激活窗口的浅颜色 | | ||
+ | | inactive_mid_1 | 非激活标题的深一点的颜色 | | ||
+ | | inactive_mid_2 | 非激活窗口的深一点的颜色 | | ||
+ | | inactive_shadow_1 | 非激活标题的深颜色,表现 3D 样式 | | ||
+ | | inactive_shadow_2 | 非激活窗口的深颜色 | | ||
- | The color symbols are as follow : | + | 这些符号在运行时被实际的色彩值替换,窗口的边框自动继承 GTK 主题的颜色。 |
- | ^ Name ^ Description ^ | + | xfwm4 原生使用的 xpm 文件格式,不过是一个纯文本文件,你可以用你喜欢的文本编辑器编辑它。 |
- | | active_text_color | Text color on title for active window | | + | |
- | | inactive_text_color | Text color on title for inactive window | | + | |
- | | active_border_color | Very rarely used usually set to black | | + | |
- | | inactive_border_color | Idem | | + | |
- | | active_color_1 | Background color for active title | | + | |
- | | active_color_2 | Background color for active window | | + | |
- | | active_hilight_1 | Lighter color for active title for 3D look | | + | |
- | | active_hilight_2 | Lighter color for active window | | + | |
- | | active_mid_1 | Slightly darker color for active title | | + | |
- | | active_mid_2 | Slightly darker color for active window | | + | |
- | | active_shadow_1 | Darker color for active title for 3D look | | + | |
- | | active_shadow_2 | Darker color for active window | | + | |
- | | inactive_color_1 | Background color for inactive title | | + | |
- | | inactive_color_2 | Background color for inactive window | | + | |
- | | inactive_hilight_1 | Lighter color for inactive title for 3D look | | + | |
- | | inactive_hilight_2 | Lighter color for inactive window | | + | |
- | | inactive_mid_1 | Slightly darker color for inactive title | | + | |
- | | inactive_mid_2 | Slightly darker color for inactive window | | + | |
- | | inactive_shadow_1 | Darker color for inactive title for 3D look | | + | |
- | | inactive_shadow_2 | Darker color for inactive window | | + | |
- | The symbols get replaced by the actual color values at runtime so that the window borders inherits GTK theme colors automatically. | ||
- | Xpm file format used natively by xfwm4 is no more than a plain text file that can be edited with your favorite text editor. | ||
- | ===== From Wikipedia, the free encyclopedia. | + | ===== 维基百科,自由的百科全书 |
- | XPM (X PixMap) is an ASCII image format used by the X Window | + | XPM(X PixMap)是一种 |
- | Therefore, if you open an xpm file with your favorite text editor, you'll see something like this: | + | 因此,如果用你喜欢的文本编辑器打开的 XPM 文件,你会看到这样的东西: |
/* XPM */ | /* XPM */ | ||
Line 175: | 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 192: | Line 192: | ||
" | " | ||
- | must be changed to | + | 必须修改为 |
" | " | ||
Line 205: | Line 205: | ||
" | " | ||
- | As a matter of fact, " | + | 事实上," |
+ | ===== Xfwm 4.2 新功能 ===== | ||
+ | 由于格式简单,XPM 颜色的符号替换表不是很强大,不足以展现在新近的主题中的漂亮的颜色渐变。 | ||
+ | 所以 Xfwm 4.2 包括另一项功能,在仍然与以前的主题格式兼容的情况下取得更好的效果:从XPM 文件和它的颜色替换表,及另一个具有透明效果的 PNG 文件(如果存在的话)生成最终的图像。 | ||
+ | 图像上获得分层XPM图像的顶部 | ||
+ | {{ howto: | ||
+ | PNG 文件的文件名和相应的 XPM 文件的文件名相同,以 “PNG” 为扩展名(即 title-1-active.png 的,top-right-inactive.png 等等)。PNG 文件不是必须的,如果它不存在,xfwm4 won't complain,但如果有一个 PNG 图像 XPM 图像的名称相同,并且具有 alpha 通道(即,有半透明的像素)的 PNG 图像将被自动叠加到 XPM 图像的上面来产生最终的图像。 | ||
- | ===== 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 | + | * 从主题设计者的角度来看,这相当简单的,大多数人在用工具(比如 [[http:// |
+ | * 这是向后兼容 Xfce4.0 xfwm4 的,xfwm4 | ||
- | {{ howto: | + | ===== 结语 ===== |
- | The names of the PNG files are identical | + | 我希望这条创建 xfwm4 主题的 “how-to” 能帮助你设计自己的主题。如果你能在 [[http:// |
- | This technique has several advantages: | + | 您还可以在 [[http:// |
+ | ===== 按钮和 frame 部件的名称列表 ===== | ||
+ | 这是所有的装饰部件名称的列表,你可以很容易地复制并粘贴。(提示:如果使用的是 Firefox 按住 Ctrl 键的同时拖动可以选择单元格,而不只是行。; | ||
- | * 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:// | + | ^ 激活 |
- | * It's backward compatible with xfwm4 from Xfce 4.0, the PNG files are just ignored by xfwm4 4.0. | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== Conclusion ===== | + | |
- | I hope this small " | + | |
- | + | ||
- | you can also find xfce theme at [[http:// | + | |
- | + | ||
- | ===== List of frame and button part names ===== | + | |
- | + | ||
- | This is a list of all possible part names in a decoration, so you can easily copy and paste them. (Tip: if using Firefox hold Ctrl while dragging, to select cells instead of lines. ;-)) | + | |
- | + | ||
- | ^ Active | + | |
| menu-active | | menu-active | ||
| shade-active | | shade-active |