Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
zh-cn:howto:xfwm4_theme [2012/04/29 04:16] – [Introduction] haobugzh-cn:howto:xfwm4_theme [2012/05/05 11:27] – [Title offset] haobug
Line 8: Line 8:
 {{ howto:xfwm4:xfwm4-window.gif |图 1 - 一个示例窗口}} {{ howto:xfwm4:xfwm4-window.gif |图 1 - 一个示例窗口}}
  
-===== Themes locations ===== +===== 主题的存放位置 =====
-In Xfwm4 version 4.0, the themes are searched in the following directories:+
  
-    * User's home dir /.themes/xfwm4/theme_name (e.g.: ''/home/joe/.themes/xfwm4/b5''+在 Xfwm4 4.0 版本中,主题搜索在下列目录:
-    * System's shared data directory /xfwm4/theme_name (e.g.: ''/usr/share/xfwm4/themes/b5'')+
  
-In Xfwm version 4.2, the theme location is in line with the standard, searched in the following directories:+    * 用户主目录/.themes/xfwm4/theme_name(例如''/home/joe/.themes/xfwm4/b5'') 
 +    * 系统共享数据目录/xfwm4/theme_name(例如: ''/usr/share/xfwm4/themes/b5''
  
-    User's home dir /.themes/theme_name/xfwm4 (e.g.: "/home/joe/.themes/b5/xfwm4") +在 Xfwm 4.2 版本中,主题的存放位置是符合标准的,在下列目录搜索: 
-    * System's shared data directory /themes/theme_name/xfwm4 (e.g.: "/usr/share/themes/b5/xfwm4")+    用户主目录/.themes/theme_name/xfwm4(例如:"/home/joe/.themes/b5/xfwm4" 
 +    * 系统共享数据目录/themes/theme_name/xfwm4(例如:"/usr/share/themes/b5/xfwm4"
  
  
 +===== 标题栏装饰 =====
  
-===== Titlebar decorations ===== +因为窗口可以处于激活的((获得焦点))或者非激活((失去焦点))两种状态。所以 xfwm4 使用相应命名的像素图,例如,title-1-active.xpm 或者 title-1-inactive.xpm
-As windows can be in either active ((focused)) or inactive ((unfocused)) states for which xfwm4 use pixmaps named accordingly e.g. title-1-active.xpm and title-1-inactive.xpm.+
  
-For title bar decorations, xfwm4 uses pixmaps named title-1-active.xpm to title-5-active.xpm with top-left-active.xpm and top-right-active.xpm making up the corners on each end as per figure 1 below.+对于标题栏的装饰,xfwm4 使用5张名为 title-1-active.xpm 到 title-5-active.xpm 的像素图以及 top-left-active.xpm 和  top-right-active.xpm 组成两端的角如下图所示。
  
-{{ howto:xfwm4:xfwm4-window-pixmaps.gif |Figure 2 - The pixmaps that compose the whole window}}+{{ howto:xfwm4:xfwm4-window-pixmaps.gif |图 2 - 构成整个窗口的像素图}}
  
-Pixmaps of a xfwm4 window +非激活 xfwm4 窗口像素图使用一样的命名约定,只是词换为 inactive;例如,title-1-inactive.xpm
-The same naming convention is true for unfocused windows with the word inactive substituted.e.g. title-1-inactive.xpm+
  
-Title text colour and shadow options, alignment etc are set in the themerc file (detailed in the themerc section).+标题文字的颜色和阴影选项,对齐方式等在 themerc 文件中设置(在themerc节详述)。
  
 +===== 窗口侧边和底部 =====
  
 +每一个窗口的侧边由两个像素图构成。左侧边的像素图叫 left-active.xpm 和 bottom-left-active.xpm 。右侧边(当然)也就是由  right-active.xpm 和 bottom-right.active.xpm 构成。
  
-===== Window Sidebars and bottom ===== +窗口底部的控制条由 bottom-active.xpm 和 bottom-inactive.xpm 构成;当改变窗口大小时它们会被重复来填充窗口。
-Each side of a window is made up of  two pixmaps. The pixmaps on the left side are named left-active.xpm and bottom-left-active.xpm. with the right side (of course) being made up of right-active.xpm and bottom-right.active.xpm.+
  
-The Window bottom grab bar is made up of bottom-active.xpm and bottom-inactive.xpm pixmaps which will be repeated to fit as the window is resized.+N.B 这些像素图也构成鼠标控制柄,当你考虑它们需要多少像素宽度时,请记得这点(特别是左下和右下像素图,它们构成窗口主要的缩放控制柄)。
  
-N.B These pixmaps also make up the mouse grab handles so keep that in mind when deciding how many pixels wide they should be (particularly the bottom-left and bottom right pixmaps which make up the main resize handles on the windows). +**Xfwm4 按钮**
-Xfwm4 Buttons+
  
-Xfwm4 can use up to six action buttons stick (sticky windows), menu, shade, hide, maximize and close.+xfwm4可以使用最多6个动作按钮 粘附(粘滞窗口),菜单,折叠,隐藏,最大化和关闭。
  
-Buttons have active ((focused)), inactive ((unfocused)) and pressed states. as per figures 3 below: +按钮有激活的((获得焦点))或者非激活((失去焦点))和按下三种状态。如下图所示:
-AbiWord Image menu-active.gif    AbiWord Image menu-inactive.gif   AbiWord Image image_2.gif+
  
-Figure 3 - Xfwm4 button states ^+图 3 - Xfwm4 按钮状态 ^
 |  {{howto:xfwm4:image_2.gif}} {{howto:xfwm4:menu-inactive.gif}} {{howto:xfwm4:menu-active.gif}}   |   |  {{howto:xfwm4:image_2.gif}} {{howto:xfwm4:menu-inactive.gif}} {{howto:xfwm4:menu-active.gif}}   |  
  
-Xfwm4 can also used "toggled"  buttons to indicated whether buttons are toggled on or off - figure 4+Xfwm4 也使用“切换”按钮,来指示按钮是否被切换 —— 见图4
-AbiWord Image stick-active.gif   AbiWord Image stick-inactive.gif   AbiWord Image stick-pressed.gif     AbiWord Image stick-toggled-active.gif   AbiWord Image image_3.gif   AbiWord Image stick-toggled-pressed.gif+
  
-Figure 4 - Stick buttons with extra toggled buttons ^^ +图 4 - 带额外切换按钮的粘附按钮 ^^ 
- {{howto:xfwm4:stick-active.gif}} {{howto:xfwm4:stick-inactive.gif}} {{howto:xfwm4:stick-pressed.gif}}     {{howto:xfwm4:stick-toggled-pressed.gif}} {{howto:xfwm4:stick-toggled-active.gif}} {{howto:xfwm4:image_3.gif}}   |+  {{howto:xfwm4:stick-active.gif|AbiWord 图片 stick-active.gif}} {{howto:xfwm4:stick-inactive.gif|AbiWord 图片 stick-inactive.gif}} {{howto:xfwm4:stick-pressed.gif|AbiWord 图片 stick-pressed.gif }}      {{howto:xfwm4:stick-toggled-pressed.gif|AbiWord 图片 stick-toggled-pressed.gif}} {{howto:xfwm4:stick-toggled-active.gif|AbiWord 图片 stick-toggled-active.gif }} {{howto:xfwm4:image_3.gif|AbiWord 图片  image_3.gif }} |
  
-===== Themerc file =====+===== Themerc 文件 =====
  
-To set features such as title text colors, "button_spacing" and "button_offset" etc. xfwm4 uses an text file called "themerc" kept in the theme folder that contains the pixmaps.+设置一个特性,比如标题文本的颜色“button_spacing”或者“button_offset”等等。xfwmr 使用一个文本文件名为“themerc”,它保存在包含的像素图的主题文件夹中。
  
 ==== Button layout ==== ==== Button layout ====
Line 77: Line 74:
  
  
-==== 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 :+另外一个需要在 "themerc" 文件中设置的设置为 "title_full_width"。这个布尔值确定怎么安排标题栏中的像素图。 
 + 
 +当设置为 "true" 时,中间的像素图被重复填充整个窗口宽度:
  
 {{ howto:xfwm4:xfwm4-title-full-width.gif }} {{ howto:xfwm4:xfwm4-title-full-width.gif }}
  
-When set to "false", the center pixmap is repeated  just enough so that the title fits :+当设置为 "false" 时,中间的像素图被重复填充到适合标题的宽度:
  
 {{ howto:xfwm4:xfwm4-title-no-full-width.gif }} {{ howto:xfwm4:xfwm4-title-no-full-width.gif }}
 +==== 文本阴影 ====
  
-==== Text shadow ==== +通过设置 "title_shadow_active"(激活窗口)或 "title_shadow_inactive"(对其他非激活窗口)为标题文本添加一个阴影。
-A shadow can be added to the title text by setting the boolean value "title_shadow_active" for the focused window, and "title_shadow_inactive" for the other unfocused windows.+
  
-Possible values are "false""true", and "frame".+可用的值为:"false""true",和 "frame"。 
 +==== 标题编移 ====
  
-==== 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