diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/speechbubble.cpp | 11 | ||||
-rw-r--r-- | src/gui/speechbubble.h | 6 | ||||
-rw-r--r-- | src/gui/theme.cpp | 2 | ||||
-rw-r--r-- | src/gui/theme.h | 2 |
4 files changed, 15 insertions, 6 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp index 66aed08c1..9bd85ad43 100644 --- a/src/gui/speechbubble.cpp +++ b/src/gui/speechbubble.cpp @@ -46,18 +46,20 @@ SpeechBubble::SpeechBubble() : mCaption->setFont(boldFont); mSpeechBox->setEditable(false); mSpeechBox->setOpaque(false); - mSpeechBox->setForegroundColor(getThemeColor(Theme::BUBBLE_TEXT)); + mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT), + getThemeColor(Theme::BUBBLE_TEXT_OUTLINE)); add(mCaption); add(mSpeechBox); } void SpeechBubble::setCaption(const std::string &name, - const gcn::Color *const color) + const gcn::Color *const color1, + const gcn::Color *const color2) { mCaption->setCaption(name); mCaption->adjustSize(); - mCaption->setForegroundColor(*color); + mCaption->setForegroundColorAll(*color1, *color2); } void SpeechBubble::setText(const std::string &text, const bool showName) @@ -65,7 +67,8 @@ void SpeechBubble::setText(const std::string &text, const bool showName) if (text == mText && (mCaption->getWidth() <= mSpeechBox->getMinWidth())) return; - mSpeechBox->setForegroundColor(getThemeColor(Theme::BUBBLE_TEXT)); + mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT), + getThemeColor(Theme::BUBBLE_TEXT_OUTLINE)); int width = mCaption->getWidth() + 2 * getPadding(); mSpeechBox->setTextWrapped(text, 130 > width ? 130 : width); diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h index ac59156a2..19efd6017 100644 --- a/src/gui/speechbubble.h +++ b/src/gui/speechbubble.h @@ -45,8 +45,10 @@ class SpeechBubble final : public Popup * Sets the name displayed for the speech bubble, and in what color. */ void setCaption(const std::string &name, - const gcn::Color *const color = - &Theme::getThemeColor(Theme::BUBBLE_NAME)); + const gcn::Color *const color1 = + &Theme::getThemeColor(Theme::BUBBLE_NAME), + const gcn::Color *const color2 = + &Theme::getThemeColor(Theme::BUBBLE_NAME_OUTLINE)); /** * Sets the text to be displayed. diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index fad36d62a..999b2ec2b 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -920,7 +920,9 @@ static int readColorType(const std::string &type) "CHARM_OUTLINE", "PLAYER_ADVANCED", "BUBBLE_NAME", + "BUBBLE_NAME_OUTLINE", "BUBBLE_TEXT", + "BUBBLE_TEXT_OUTLINE", "RED", "RED_OUTLINE", "GREEN", diff --git a/src/gui/theme.h b/src/gui/theme.h index 812689048..38e3b7024 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -360,7 +360,9 @@ class Theme final : public Palette, public ConfigListener CHARM_OUTLINE, PLAYER_ADVANCED, BUBBLE_NAME, + BUBBLE_NAME_OUTLINE, BUBBLE_TEXT, + BUBBLE_TEXT_OUTLINE, RED, RED_OUTLINE, GREEN, |