Add entry_suffix color for skin theme

This commit is contained in:
David Capello 2013-03-29 16:27:08 -03:00
parent c2664b6aac
commit f805a83527
3 changed files with 11 additions and 2 deletions

View File

@ -13,6 +13,7 @@
<color id="desktop" value="#968275" />
<color id="textbox_text" value="#000000" />
<color id="textbox_face" value="#ffffff" />
<color id="entry_suffix" value="#c6c6c6" />
<color id="link_text" value="#0000ff" />
<color id="button_normal_text" value="#000000" />
<color id="button_normal_face" value="#c6c6c6" />

View File

@ -282,6 +282,7 @@ SkinTheme::SkinTheme()
color_mapping["desktop"] = ThemeColor::Desktop;
color_mapping["textbox_text"] = ThemeColor::TextBoxText;
color_mapping["textbox_face"] = ThemeColor::TextBoxFace;
color_mapping["entry_suffix"] = ThemeColor::EntrySuffix;
color_mapping["link_text"] = ThemeColor::LinkText;
color_mapping["button_normal_text"] = ThemeColor::ButtonNormalText;
color_mapping["button_normal_face"] = ThemeColor::ButtonNormalFace;
@ -1024,12 +1025,18 @@ void SkinTheme::paintEntry(PaintEvent& ev)
}
// Disabled
if (!widget->isEnabled() || (c >= suffixIndex)) {
if (!widget->isEnabled()) {
bg = ColorNone;
fg = getColor(ThemeColor::Disabled);
}
// Suffix
if (c >= suffixIndex) {
if (widget->hasFocus())
break;
bg = ColorNone;
fg = getColor(ThemeColor::Disabled);
fg = getColor(ThemeColor::EntrySuffix);
}
w = CHARACTER_LENGTH(widget->getFont(), ch);

View File

@ -47,6 +47,7 @@ namespace ThemeColor {
Desktop,
TextBoxText,
TextBoxFace,
EntrySuffix,
LinkText,
ButtonNormalText,
ButtonNormalFace,