summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-06 12:51:53 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-06 12:51:53 +0300
commitf02ad41aacd14b0c5f53fb01fe833c42b81f8d63 (patch)
tree16b2fff2cd57591d7c39e7b6861c7445bb8375c4 /src/gui
parentee13b712f0c9a285baf7a43e6d58b367dd6145f1 (diff)
downloadManaVerse-f02ad41aacd14b0c5f53fb01fe833c42b81f8d63.tar.gz
ManaVerse-f02ad41aacd14b0c5f53fb01fe833c42b81f8d63.tar.bz2
ManaVerse-f02ad41aacd14b0c5f53fb01fe833c42b81f8d63.tar.xz
ManaVerse-f02ad41aacd14b0c5f53fb01fe833c42b81f8d63.zip
add outline color in dropdown.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/theme.cpp1
-rw-r--r--src/gui/theme.h1
-rw-r--r--src/gui/widgets/dropdown.cpp8
-rw-r--r--src/gui/widgets/dropdown.h1
4 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 9ed1f44a5..6c64af727 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -791,6 +791,7 @@ static int readColorType(const std::string &type)
"CHECKBOX",
"CHECKBOX_OUTLINE",
"DROPDOWN",
+ "DROPDOWN_OUTLINE",
"LABEL",
"LABEL_OUTLINE",
"LISTBOX",
diff --git a/src/gui/theme.h b/src/gui/theme.h
index a9aa8b2f5..1f49fe4ec 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -231,6 +231,7 @@ class Theme final : public Palette, public ConfigListener
CHECKBOX,
CHECKBOX_OUTLINE,
DROPDOWN,
+ DROPDOWN_OUTLINE,
LABEL,
LABEL_OUTLINE,
LISTBOX,
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 *const>(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;