修改RichFaces的默认字体和大小
2009-04-13 09:45
288 查看
毕竟是老外的框架,默认的字体大小弄个11px
明显不符合中国国情,不够和谐
不过还好,RichFaces与其他J***A开源框架一样,提供了很强大的定制功能
只需三步即可修正这个问题
一、复制richfaces-impl.jar/META-INF/skins/DEFAULT.skin.properties至ClassPath下
并改名为common.skin.properties
二、修改其中与字体大小相关的设置,将11px改为12px,如下
Css代码
generalSizeFont=12px
headerSizeFont=12px
tabSizeFont=12
buttonSizeFont=12 (这两个为啥没有px?)
再顺便将默认字体也改下,首选宋体(SimSun),如下
Css代码
generalFamilyFont=SimSun, Arial, Verdana, sans-serif
headerFamilyFont=SimSun, Arial, Verdana, sans-serif
tabFamilyFont=SimSun, Arial, Verdana, sans-serif
buttonFamilyFont=SimSun, Arial, Verdana, sans-serif
三、web.xml添加一行配置
Xml代码
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>common</param-value>
</context-param>
启动服务 查看页面 太和谐了...
附上最终配置
Css代码
#Colors
headerBackgroundColor=#D4CFC7
headerGradientColor=#EDEAE6
headerTextColor=#000000
headerWeightFont=bold
generalBackgroundColor=#FFFFFF
generalTextColor=#000000
generalSizeFont=12px
generalFamilyFont=SimSun, Arial, Verdana, sans-serif
controlTextColor=#000000
controlBackgroundColor=#ffffff
additionalBackgroundColor=#F1EEE9
shadowBackgroundColor=#000000
shadowOpacity=1
panelBorderColor=#C4C0B9
subBorderColor=#ffffff
tabBackgroundColor=#E3DED5
tabDisabledTextColor=#B1ADA7
trimColor=#DFDCD5
tipBackgroundColor=/#FAE6B0
tipBorderColor=/#E5973E
selectControlColor=#E79A00
generalLinkColor=#0078D0
hoverLinkColor=#0090FF
visitedLinkColor=#0090FF
# Fonts
headerSizeFont=12px
headerFamilyFont=SimSun, Arial, Verdana, sans-serif
tabSizeFont=12
tabFamilyFont=SimSun, Arial, Verdana, sans-serif
buttonSizeFont=12
buttonFamilyFont=SimSun, Arial, Verdana, sans-serif
tableBackgroundColor=#FFFFFF
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C4C0C9
tableBorderWidth=1px
#Calendar colors
calendarWeekBackgroundColor=#F1EEE9
calendarHolidaysBackgroundColor=#FFEBDA
calendarHolidaysTextColor=#FF7800
calendarCurrentBackgroundColor=#FF7800
calendarCurrentTextColor=#FFEBDA
calendarSpecBackgroundColor=#F1EEE9
calendarSpecTextColor=#000000
warningColor=#FFE6E6
warningBackgroundColor=#FF0000
editorBackgroundColor=#F1F1F1
editBackgroundColor=#FEFFDA
#Gradients
gradientType=plain
明显不符合中国国情,不够和谐
不过还好,RichFaces与其他J***A开源框架一样,提供了很强大的定制功能
只需三步即可修正这个问题
一、复制richfaces-impl.jar/META-INF/skins/DEFAULT.skin.properties至ClassPath下
并改名为common.skin.properties
二、修改其中与字体大小相关的设置,将11px改为12px,如下
Css代码
generalSizeFont=12px
headerSizeFont=12px
tabSizeFont=12
buttonSizeFont=12 (这两个为啥没有px?)
再顺便将默认字体也改下,首选宋体(SimSun),如下
Css代码
generalFamilyFont=SimSun, Arial, Verdana, sans-serif
headerFamilyFont=SimSun, Arial, Verdana, sans-serif
tabFamilyFont=SimSun, Arial, Verdana, sans-serif
buttonFamilyFont=SimSun, Arial, Verdana, sans-serif
三、web.xml添加一行配置
Xml代码
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>common</param-value>
</context-param>
启动服务 查看页面 太和谐了...
附上最终配置
Css代码
#Colors
headerBackgroundColor=#D4CFC7
headerGradientColor=#EDEAE6
headerTextColor=#000000
headerWeightFont=bold
generalBackgroundColor=#FFFFFF
generalTextColor=#000000
generalSizeFont=12px
generalFamilyFont=SimSun, Arial, Verdana, sans-serif
controlTextColor=#000000
controlBackgroundColor=#ffffff
additionalBackgroundColor=#F1EEE9
shadowBackgroundColor=#000000
shadowOpacity=1
panelBorderColor=#C4C0B9
subBorderColor=#ffffff
tabBackgroundColor=#E3DED5
tabDisabledTextColor=#B1ADA7
trimColor=#DFDCD5
tipBackgroundColor=/#FAE6B0
tipBorderColor=/#E5973E
selectControlColor=#E79A00
generalLinkColor=#0078D0
hoverLinkColor=#0090FF
visitedLinkColor=#0090FF
# Fonts
headerSizeFont=12px
headerFamilyFont=SimSun, Arial, Verdana, sans-serif
tabSizeFont=12
tabFamilyFont=SimSun, Arial, Verdana, sans-serif
buttonSizeFont=12
buttonFamilyFont=SimSun, Arial, Verdana, sans-serif
tableBackgroundColor=#FFFFFF
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C4C0C9
tableBorderWidth=1px
#Calendar colors
calendarWeekBackgroundColor=#F1EEE9
calendarHolidaysBackgroundColor=#FFEBDA
calendarHolidaysTextColor=#FF7800
calendarCurrentBackgroundColor=#FF7800
calendarCurrentTextColor=#FFEBDA
calendarSpecBackgroundColor=#F1EEE9
calendarSpecTextColor=#000000
warningColor=#FFE6E6
warningBackgroundColor=#FF0000
editorBackgroundColor=#F1F1F1
editBackgroundColor=#FEFFDA
#Gradients
gradientType=plain
相关文章推荐
- 何在Android系统上修改系统默认的字体大小
- CKEditor4修改默认字体显示大小
- 修改UItextField输入框placeholder的字体默认颜色和大小,采用KVC方式设置
- android 中对 gps 默认关闭+语言默认中文的设置+时区设置+修改系统名字+修改系统默认时间+修改屏幕休眠时间+修改usb debug默认关闭+mtk修改默认字体大小
- php修改NetBeans默认字体的大小
- android4.1 修改默认字体大小
- Android 如何修改系统默认字体大小
- 在Visio2010中修改默认字体的大小
- 关于如何修改PreferenceFragment中默认的字体颜色和大小
- android studio默认修改主题,字体,文字颜色,大小等属性的设置
- visio 2010 修改 默认字体 字号大小 方法
- android 中对 gps 默认关闭+语言默认中文的设置+时区设置+修改系统名字+修改系统默认时间+修改屏幕休眠时间+修改usb debug默认关闭+mtk修改默认字体大小
- 修改Android默认字体大小
- 修改博客园默认的代码字体大小
- 修改 Ueditor 默认显示的字体大小
- visio 2010 修改 默认字体 字号大小 方法[整理]
- FB修改默认字体大小
- 如何在Android系统上修改系统默认的字体大小
- zend studio 字体大小修改,默认编码设置