From f02ad41aacd14b0c5f53fb01fe833c42b81f8d63 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 May 2013 12:51:53 +0300 Subject: add outline color in dropdown. --- src/gui/widgets/dropdown.cpp | 8 +++++--- src/gui/widgets/dropdown.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index f05f40b62..c2b2e854b 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -77,6 +77,7 @@ DropDown::DropDown(const Widget2 *const widget, mPadding(1), mImagePadding(2), mSpacing(0), + mForegroundColor2(getThemeColor(Theme::DROPDOWN_OUTLINE)), mDroppedDown(false), mPushed(false), mFoldedUpHeight(0), @@ -145,7 +146,8 @@ DropDown::DropDown(const Widget2 *const widget, addFocusListener(this); adjustHeight(); - mPopup->setForegroundColor(getThemeColor(Theme::DROPDOWN)); +// mPopup->setForegroundColorAll(getThemeColor(Theme::DROPDOWN), +// getThemeColor(Theme::DROPDOWN_OUTLINE)); setForegroundColor(getThemeColor(Theme::DROPDOWN)); if (!eventId.empty()) @@ -238,7 +240,8 @@ void DropDown::draw(gcn::Graphics* graphics) if (model && mPopup->getSelected() >= 0) { gcn::Font *const font = getFont(); - graphics->setColor(mForegroundColor); + static_cast(graphics)->setColorAll( + mForegroundColor, mForegroundColor2); if (mExtended) { const int sel = mPopup->getSelected(); @@ -277,7 +280,6 @@ void DropDown::draw(gcn::Graphics* graphics) if (mDroppedDown) { -// drawChildren(graphics); // Draw two lines separating the ListBox with selected // element view. graphics->setColor(mHighlightColor); diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index a145d708c..ae74e571d 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -153,6 +153,7 @@ class DropDown final : public gcn::ActionListener, int mPadding; int mImagePadding; int mSpacing; + gcn::Color mForegroundColor2; bool mDroppedDown; bool mPushed; -- cgit v1.2.3-70-g09d2