diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/tab.cpp | 15 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 5cf1b05a..502ab686 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -83,11 +83,16 @@ void ProgressBar::draw(gcn::Graphics *graphics) rect.x = 0; rect.y = 0; + Theme::ProgressPalette palette = Theme::THEME_PROG_END; + if (mProgressPalette >= 0) + palette = static_cast<Theme::ProgressPalette>(mProgressPalette); + gui->getTheme()->drawProgressBar(static_cast<Graphics *>(graphics), rect, mColor, mProgress, - mText); + mText, + palette); } void ProgressBar::setProgress(float progress) diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index b2779c4f..0f6ca4e5 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -73,18 +73,27 @@ void Tab::draw(gcn::Graphics *graphics) if (mTabbedArea && mTabbedArea->isTabSelected(this)) flags |= STATE_SELECTED; - auto &skin = gui->getTheme()->getSkin(SkinType::Tab); + auto theme = gui->getTheme(); + auto &palette = theme->getPalette(0); + auto &skin = theme->getSkin(SkinType::Tab); + if (auto state = skin.getState(flags)) { gcn::Color foregroundColor = state->textFormat.color; + auto outlineColor = state->textFormat.outlineColor; if (mFlash) - foregroundColor = Theme::getThemeColor(Theme::TAB_FLASH); + { + foregroundColor = palette.getColor(Theme::TAB_FLASH); + outlineColor = palette.getOutlineColor(Theme::TAB_FLASH); + } else if (mTabColor) + { foregroundColor = *mTabColor; + } auto label = static_cast<Label*>(mLabel); label->setForegroundColor(foregroundColor); - label->setOutlineColor(state->textFormat.outlineColor); + label->setOutlineColor(outlineColor); label->setShadowColor(state->textFormat.shadowColor); } |