From 7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 22 Aug 2011 16:28:01 +0300 Subject: Add new colors to themes: BORDER, BACKGROUND_GRAY, SCROLLBAR_GRAY. --- src/gui/widgets/desktop.cpp | 7 ++++--- src/gui/widgets/itemcontainer.cpp | 2 ++ src/gui/widgets/scrollarea.cpp | 8 ++++---- src/gui/widgets/spellshortcutcontainer.cpp | 1 - 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index cfb757638..40d90ba11 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -53,7 +53,8 @@ Desktop::Desktop() : mVersionLabel = new Label(strprintf("%s (Mana %s)", appName.c_str(), FULL_VERSION)); - mVersionLabel->setBackgroundColor(gcn::Color(255, 255, 255, 128)); + mVersionLabel->setBackgroundColor( + Theme::getThemeColor(Theme::BACKGROUND, 128)); add(mVersionLabel, 25, 2); } @@ -85,7 +86,7 @@ void Desktop::draw(gcn::Graphics *graphics) getHeight() > mWallpaper->getHeight())) { // TODO: Color from palette - g->setColor(gcn::Color(64, 64, 64)); + g->setColor(Theme::getThemeColor(Theme::BACKGROUND_GRAY)); g->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -106,7 +107,7 @@ void Desktop::draw(gcn::Graphics *graphics) } // Draw a thin border under the application version... - g->setColor(gcn::Color(255, 255, 255, 128)); + g->setColor(Theme::getThemeColor(Theme::BACKGROUND, 128)); g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); Container::draw(graphics); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index c2a5ec1b7..c28e4fb4c 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -213,6 +213,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) } } +/* // Draw an orange box around the selected item if (isFocused() && mHighlightedIndex != -1 && mGridColumns) { @@ -221,6 +222,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) g->setColor(gcn::Color(255, 128, 0)); g->drawRectangle(gcn::Rectangle(itemX, itemY, BOX_WIDTH, BOX_HEIGHT)); } +*/ } void ItemContainer::selectNone() diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 03f5f8c4c..3e90bf4c7 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -439,17 +439,17 @@ void ScrollArea::drawRightButton(gcn::Graphics *graphics) void ScrollArea::drawVBar(gcn::Graphics *graphics) { const gcn::Rectangle dim = getVerticalBarDimension(); - graphics->setColor(gcn::Color(0, 0, 0, 32)); + graphics->setColor(Theme::getThemeColor(Theme::SCROLLBAR_GRAY, 32)); graphics->fillRectangle(dim); - graphics->setColor(gcn::Color(255, 255, 255)); + graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND)); } void ScrollArea::drawHBar(gcn::Graphics *graphics) { const gcn::Rectangle dim = getHorizontalBarDimension(); - graphics->setColor(gcn::Color(0, 0, 0, 32)); + graphics->setColor(Theme::getThemeColor(Theme::SCROLLBAR_GRAY, 32)); graphics->fillRectangle(dim); - graphics->setColor(gcn::Color(255, 255, 255)); + graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND)); } void ScrollArea::drawVMarker(gcn::Graphics *graphics) diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 8d5b563bb..7e19b0348 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -106,7 +106,6 @@ void SpellShortcutContainer::draw(gcn::Graphics *graphics) Graphics *g = static_cast(graphics); - graphics->setColor(gcn::Color(0, 0, 0, 255)); graphics->setFont(getFont()); int selectedId = spellShortcut->getSelectedItem(); -- cgit v1.2.3-60-g2f50