diff options
Diffstat (limited to 'src/gui/widgets/dropdown.cpp')
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 7036c2ee..076a167f 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -24,8 +24,8 @@ #include "dropdown.h" -#include "../color.h" #include "../listbox.h" +#include "../palette.h" #include "../scrollarea.h" #include "../../configuration.h" @@ -140,27 +140,24 @@ void DropDown::draw(gcn::Graphics* graphics) } } - bool valid; +// bool valid; const int alpha = (int)(mAlpha * 255.0f); gcn::Color faceColor = getBaseColor(); faceColor.a = alpha; - gcn::Color highlightColor = textColor->getColor('H', valid); - highlightColor.a = alpha; + gcn::Color highlightColor = guiPalette->getColor(Palette::HIGHLIGHT, alpha); gcn::Color shadowColor = faceColor - 0x303030; shadowColor.a = alpha; if (mOpaque) { - int red = getBackgroundColor().r; - int green = getBackgroundColor().g; - int blue = getBackgroundColor().b; - graphics->setColor(gcn::Color(red, green, blue, alpha)); + gcn::Color col = getBackgroundColor(); + col.a = alpha; + graphics->setColor(col); graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), h)); - red = getForegroundColor().r; - green = getForegroundColor().g; - blue = getForegroundColor().b; - graphics->setColor(gcn::Color(red, green, blue, alpha)); + col = getForegroundColor(); + col.a = alpha; + graphics->setColor(col); } graphics->setFont(getFont()); |