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 [2012/04/29 07:32] – [标题栏装饰] haobug | zh-cn:howto:xfwm4_theme [2013/01/20 14:00] – haobug | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== 介绍 ===== | ===== 介绍 ===== | ||
- | Xfwm4,Xfce4 的原生的窗口管理器,使用一种简单而灵活基于像素图的主题引擎,它用 .xpm 格式的图像。Xfwm4 还使用一个文本文件,配置其他选项(见 themerc 节)。此外,你还可以选用 gtk 主题颜色,这将文档在 gtk 颜色一节提到。 | + | Xfwm4 是 Xfce4 的原生的窗口管理器,它使用一种简单而灵活基于像素图的主题引擎,使用 .xpm 格式的图像。Xfwm4 还使用一个文本文件,配置其他选项(见 themerc |
{{ howto: | {{ howto: | ||
Line 10: | Line 10: | ||
===== 主题的存放位置 ===== | ===== 主题的存放位置 ===== | ||
- | 在 Xfwm4 4.0 版本中,主题搜索在下列目录: | + | 在 Xfwm4 版本 |
* 用户主目录/ | * 用户主目录/ | ||
* 系统共享数据目录/ | * 系统共享数据目录/ | ||
- | 在 Xfwm 4.2 版本中,主题的存放位置是符合标准的,在下列目录搜索: | + | 在 Xfwm 版本 |
- | * 用户主目录/ | + | * 用户主目录/ |
- | * 系统共享数据目录/ | + | * 系统共享数据目录/ |
- | ===== 标题栏装饰 ===== | + | ===== 标题栏修饰 ===== |
因为窗口可以处于激活的((获得焦点))或者非激活((失去焦点))两种状态。所以 xfwm4 使用相应命名的像素图,例如,title-1-active.xpm 或者 title-1-inactive.xpm。 | 因为窗口可以处于激活的((获得焦点))或者非激活((失去焦点))两种状态。所以 xfwm4 使用相应命名的像素图,例如,title-1-active.xpm 或者 title-1-inactive.xpm。 | ||
- | 对于标题栏的装饰,xfwm4 使用5张名为 title-1-active.xpm 到 title-5-active.xpm 的像素图以及 top-left-active.xpm 和 top-right-active.xpm 组成两端的角如下图所示。 | + | 对于标题栏的修饰,xfwm4 使用 5 张名为 title-1-active.xpm 到 title-5-active.xpm 的像素图以及 top-left-active.xpm 和 top-right-active.xpm 组成两端的角如下图所示。 |
{{ howto: | {{ howto: | ||
- | 非激活 xfwm4 窗口像素图使用一样的命名约定,只是词换为 inactive;例如,title-1-inactive.xpm。 | + | 非激活 xfwm4 窗口像素图使用一样的命名约定,只是单词换为 inactive;例如,title-1-inactive.xpm。 |
- | 标题文字的颜色和阴影选项,对齐方式等在 themerc 文件中设置(在themerc节详述)。 | + | 标题文字的颜色和阴影选项,对齐方式等在 themerc 文件中设置(在 themerc |
===== 窗口侧边和底部 ===== | ===== 窗口侧边和底部 ===== | ||
Line 36: | Line 36: | ||
每一个窗口的侧边由两个像素图构成。左侧边的像素图叫 left-active.xpm 和 bottom-left-active.xpm 。右侧边(当然)也就是由 | 每一个窗口的侧边由两个像素图构成。左侧边的像素图叫 left-active.xpm 和 bottom-left-active.xpm 。右侧边(当然)也就是由 | ||
- | 窗口底部的控制条由 bottom-active.xpm 和 bottom-inactive.xpm 构成;当改变窗口大小时它们会被重复来填充窗口。 | + | 窗口底部的控制条由 bottom-active.xpm 和 bottom-inactive.xpm 构成;当窗口大小改变时它们会被重复填充。 |
- | N.B 这些像素图也构成鼠标控制柄,当你考虑它们需要多少像素宽度时,请记得这点(特别是左下和右下像素图,它们构成窗口主要的缩放控制柄)。 | + | 注意:这些像素图也构成鼠标控制柄,当你决定它们需要多少像素宽度时,请记住这一点(特别是左下和右下像素图,它们构成窗口主要的缩放控制柄)。 |
- | **Xfwm4 按钮** | + | ===== Xfwm4 按钮 |
- | xfwm4可以使用6个动作按钮 | + | xfwm4 最多可以使用 6 种动作按钮 |
- | + | ||
- | 按钮有激活的((获得焦点))或者非激活((失去焦点))和按下三种状态。如下图所示: | + | |
+ | 按钮有激活的((获得焦点))或者非激活((失去焦点))和按下三种状态。如图 3 所示: | ||
+ | AbiWord 图片 menu-active.gif AbiWord 图片 menu-inactive.gif AbiWord 图片 image_2.gif | ||
^ 图 3 - Xfwm4 按钮状态 ^ | ^ 图 3 - Xfwm4 按钮状态 ^ | ||
| {{howto: | | {{howto: | ||
- | Xfwm4 也使用“切换”按钮,来指示按钮是不被切换 —— 见图4 | + | Xfwm4 也使用'' |
^ 图 4 - 带额外切换按钮的粘附按钮 ^^ | ^ 图 4 - 带额外切换按钮的粘附按钮 ^^ | ||
- | | | + | | |
- | ===== Themerc file ===== | + | ===== themerc 文件 |
- | To set features such as title text colors, " | + | xfwm4 使用 '' |
- | ==== Button layout | + | ==== 按钮布局 |
- | It is also possible to " | + | |
+ | 也可以为特定主题定义'' | ||
# button_layout : | # button_layout : | ||
# O = Option menu | # O = Option menu | ||
Line 71: | Line 71: | ||
button_layout=OTS|HMC | button_layout=OTS|HMC | ||
- | A working example of this is the "B5" theme which only uses the close button. i.e. the entry "button_layout=C|" in the themerc file. | + | 现实的例子是,'' |
+ | ==== 标题宽度 ==== | ||
- | ==== Title width ==== | + | 另外一个需要在 '' |
- | Another setting that needs to be set from the "themerc" file is the "title_full_width" parameter. This boolean value determines how the pixmap are arranged in the title bar. | + | |
- | When set to "true", the center pixmap is repeated so that it fills the entire window width : | + | 当设置为 '' |
{{ howto: | {{ howto: | ||
- | When set to "false", the center pixmap is repeated | + | 当设置为 '' |
{{ howto: | {{ howto: | ||
- | ==== Text shadow | + | ==== 文本阴影 |
- | A shadow can be added to the title text by setting the boolean value " | + | |
- | Possible values are " | + | 通过设置 '' |
- | ==== Title offset | + | 可用的值为:'' |
- | The title text position can be adjusted to fit the theme design by using the offset values. The horizontal and vertical values can be adjusted by using the following settings: | + | |
+ | ==== 标题偏移 | ||
+ | |||
+ | 标题文本的位置,可以用偏移量来调整以适应主题设计。水平和垂直偏移的值可以用下面的设置项来调整: | ||
* title_horizontal_offset | * title_horizontal_offset | ||
* title_vertical_offset_active | * title_vertical_offset_active | ||
* title_vertical_offset_inactive | * title_vertical_offset_inactive | ||
+ | |||
==== Button offset and spacing ==== | ==== Button offset and spacing ==== | ||
Line 254: | Line 258: | ||
===== Credits ===== | ===== Credits ===== | ||
This how-to has been started by Drewbian (drewbian at tsn dot cc) and later modifed by Olivier Fourdan (fourdan at xfce dot org). | This how-to has been started by Drewbian (drewbian at tsn dot cc) and later modifed by Olivier Fourdan (fourdan at xfce dot org). | ||
+ |