diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-04 22:41:19 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-12 14:49:27 -0700 |
commit | 781b3c9f17708cc5fe08eb3c9ee38d596364d97c (patch) | |
tree | 833797c9b9168ab58864ffe4cf8ed028060e44a2 /src/gui/widgets/browserbox.cpp | |
parent | 96b64757954f07d196599b3c1131a6603982c930 (diff) | |
download | mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.gz mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.bz2 mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.xz mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.zip |
Split Palette into Theme and UserPalette
Themes can now control the colors they use. Colors in the Viewport (being
names, particles, etc) can still be changed by the user. Also make
ProgressBars more easily colored. DyePalette was made more flexible in the
process.
Also fixes comparing strings of different lengths insensitively.
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index de4f7a40..d43afed7 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -21,7 +21,7 @@ #include "gui/widgets/browserbox.h" -#include "gui/palette.h" +#include "gui/theme.h" #include "gui/widgets/linkhandler.h" @@ -268,7 +268,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) if (mOpaque) { - graphics->setColor(guiPalette->getColor(Palette::BACKGROUND)); + graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND)); graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -276,7 +276,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) { if ((mHighMode & BACKGROUND)) { - graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT)); + graphics->setColor(Theme::getThemeColor(Theme::HIGHLIGHT)); graphics->fillRectangle(gcn::Rectangle( mLinks[mSelectedLink].x1, mLinks[mSelectedLink].y1, @@ -287,7 +287,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) if ((mHighMode & UNDERLINE)) { - graphics->setColor(guiPalette->getColor(Palette::HYPERLINK)); + graphics->setColor(Theme::getThemeColor(Theme::HYPERLINK)); graphics->drawLine( mLinks[mSelectedLink].x1, mLinks[mSelectedLink].y2, @@ -305,8 +305,8 @@ void BrowserBox::draw(gcn::Graphics *graphics) char const *hyphen = "~"; int hyphenWidth = font->getWidth(hyphen); - graphics->setColor(guiPalette->getColor(Palette::TEXT)); - const gcn::Color textColor = guiPalette->getColor(Palette::TEXT); + graphics->setColor(Theme::getThemeColor(Theme::TEXT)); + const gcn::Color textColor = Theme::getThemeColor(Theme::TEXT); TextRowsHeightIterator h = mTextRowsHeights.begin(); for (TextRowIterator i = mTextRows.begin(); @@ -373,7 +373,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) { const char c = row.at(start + 2); bool valid; - const gcn::Color col = guiPalette->getColor(c, valid); + const gcn::Color col = Theme::getThemeColor(c, valid); if (c == '>') { |