diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-22 22:46:16 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-22 22:46:16 +0000 |
| commit | 033e9843bcec8340c9e657fe0f0519f86075424b (patch) | |
| tree | 6bebf966b56fac4bf36f8060abfd77119e584c60 /otk/focuslabel.cc | |
| parent | 75e8fc2705d9c606a702eb7057e9e503be90618b (diff) | |
otk using new render shit.. supposedly
Diffstat (limited to 'otk/focuslabel.cc')
| -rw-r--r-- | otk/focuslabel.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/otk/focuslabel.cc b/otk/focuslabel.cc index 6869d231..24f3ff52 100644 --- a/otk/focuslabel.cc +++ b/otk/focuslabel.cc @@ -20,22 +20,21 @@ FocusLabel::~FocusLabel() } -void FocusLabel::setStyle(Style *style) +void FocusLabel::setStyle(RenderStyle *style) { FocusWidget::setStyle(style); - // XXX: do this again - //setTexture(style->getLabelFocus()); - //setUnfocusTexture(style->getLabelUnfocus()); + setTexture(style->labelFocusBackground()); + setUnfocusTexture(style->labelUnfocusBackground()); } void FocusLabel::renderForeground(void) { - const Font *ft = style()->getFont(); - Color *text_color = (isFocused() ? style()->getTextFocus() - : style()->getTextUnfocus()); - unsigned int sidemargin = style()->getBevelWidth() * 2; + const Font *ft = style()->labelFont(); + RenderColor *text_color = (isFocused() ? style()->textFocusColor() + : style()->textUnfocusColor()); + unsigned int sidemargin = style()->bevelWidth() * 2; ustring t = _text; // the actual text to draw int x = sidemargin; // x coord for the text @@ -54,14 +53,14 @@ void FocusLabel::renderForeground(void) } while (length > max_length && text_len-- > 0); // justify the text - switch (style()->textJustify()) { - case Style::RightJustify: + switch (style()->labelTextJustify()) { + case RenderStyle::RightJustify: x += max_length - length; break; - case Style::CenterJustify: + case RenderStyle::CenterJustify: x += (max_length - length) / 2; break; - case Style::LeftJustify: + case RenderStyle::LeftJustify: break; } } |
