Tabs look better with dialog surfaces than with widget surfaces. There's

still room for improvements, though...

svn-id: r20330
This commit is contained in:
Torbjörn Andersson 2006-01-31 09:45:36 +00:00
parent 74dd2e133d
commit 484fca6549

View File

@ -446,11 +446,11 @@ void ThemeNew::drawCheckbox(const Common::Rect &r, const Common::String &str, bo
void ThemeNew::drawTab(const Common::Rect &r, const Common::String &str, bool active, kState state) {
if (!_initOk)
return;
drawRectMasked(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd),
(state == kStateDisabled) ? 128 : 256, _colors[kTabBackgroundStart], _colors[kTabBackgroundEnd], 2);
if (active) {
_font->drawString(&_screen, str, r.left, r.top+2, r.width(), getColor(kStateHighlight), Graphics::kTextAlignCenter, 0, true);
} else {
drawRectMasked(r, surface(kWidgetBkgdCorner), surface(kWidgetBkgdTop), surface(kWidgetBkgdLeft), surface(kWidgetBkgd),
(state == kStateDisabled) ? 128 : 256, _colors[kTabBackgroundStart], _colors[kTabBackgroundEnd], 2);
_font->drawString(&_screen, str, r.left, r.top+2, r.width(), getColor(state), Graphics::kTextAlignCenter, 0, true);
}
addDirtyRect(r);