summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-24 22:36:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-24 22:36:00 +0300
commit52039744fa2e5e116548e5236cd8ba5f5d81702a (patch)
treed367514cfc2a00c0b1f181dbfb5a8c3b0ca5785d /src/gui/popups
parent35d796b927447760772d2720a221e21fdf9fd10e (diff)
downloadplus-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.gz
plus-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.bz2
plus-52039744fa2e5e116548e5236cd8ba5f5d81702a.tar.xz
plus-52039744fa2e5e116548e5236cd8ba5f5d81702a.zip
Remove default parameters from widget2.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/beingpopup.cpp16
-rw-r--r--src/gui/popups/itempopup.cpp36
-rw-r--r--src/gui/popups/skillpopup.cpp25
-rw-r--r--src/gui/popups/speechbubble.cpp10
-rw-r--r--src/gui/popups/spellpopup.cpp10
-rw-r--r--src/gui/popups/statuspopup.cpp5
-rw-r--r--src/gui/popups/textpopup.cpp5
7 files changed, 63 insertions, 44 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 299683f6d..9e03e859c 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -79,8 +79,9 @@ void BeingPopup::addLabels(const int fontHeight)
{
Label *const label = new Label(this, "A");
label->setPosition(0, fontHeight * (f + 1));
- label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ label->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
mLabels.push_back(label);
}
}
@@ -113,14 +114,15 @@ void BeingPopup::show(const int x, const int y, Being *const b)
}
if (b->isAdvanced())
{
- mBeingName->setForegroundColorAll(getThemeColor(
- ThemeColorId::PLAYER_ADVANCED), getThemeColor(
- ThemeColorId::PLAYER_ADVANCED_OUTLINE));
+ mBeingName->setForegroundColorAll(
+ getThemeColor(ThemeColorId::PLAYER_ADVANCED, 255U),
+ getThemeColor(ThemeColorId::PLAYER_ADVANCED_OUTLINE, 255U));
}
else
{
- mBeingName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mBeingName->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
}
mBeingName->adjustSize();
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 9c0607a2f..acfe6714b 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -87,32 +87,37 @@ ItemPopup::ItemPopup() :
// Item description
mItemDesc->setEditable(false);
mItemDesc->setPosition(0, fontHeight);
- mItemDesc->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemDesc->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
// Item effect
mItemEffect->setEditable(false);
mItemEffect->setPosition(0, 2 * fontHeight);
- mItemEffect->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemEffect->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
// Item weight
mItemWeight->setEditable(false);
mItemWeight->setPosition(0, 3 * fontHeight);
- mItemWeight->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemWeight->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
// Item cards
mItemCards->setEditable(false);
mItemCards->setPosition(0, 4 * fontHeight);
- mItemCards->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemCards->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
// Item options
mItemOptions->setEditable(false);
mItemOptions->setPosition(0, 5 * fontHeight);
- mItemOptions->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemOptions->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
}
void ItemPopup::postInit()
@@ -411,8 +416,9 @@ std::string ItemPopup::getOptionsString(const ItemOptionsList *const options)
#define caseSetColor(name1, name2) \
case name1: \
{ \
- return label->setForegroundColorAll(getThemeColor(name2), \
- getThemeColor(name2##_OUTLINE)); \
+ return label->setForegroundColorAll( \
+ getThemeColor(name2, 255U), \
+ getThemeColor(name2##_OUTLINE, 255U)); \
}
void ItemPopup::setLabelColor(Label *label,
const ItemDbTypeT type) const
@@ -440,9 +446,9 @@ void ItemPopup::setLabelColor(Label *label,
caseSetColor(ItemDbType::CARD, ThemeColorId::CARD)
default:
{
- return label->setForegroundColorAll(getThemeColor(
- ThemeColorId::UNKNOWN_ITEM), getThemeColor(
- ThemeColorId::UNKNOWN_ITEM_OUTLINE));
+ return label->setForegroundColorAll(
+ getThemeColor(ThemeColorId::UNKNOWN_ITEM, 255U),
+ getThemeColor(ThemeColorId::UNKNOWN_ITEM_OUTLINE, 255U));
}
}
}
diff --git a/src/gui/popups/skillpopup.cpp b/src/gui/popups/skillpopup.cpp
index c2a583e30..7272fb316 100644
--- a/src/gui/popups/skillpopup.cpp
+++ b/src/gui/popups/skillpopup.cpp
@@ -55,30 +55,35 @@ SkillPopup::SkillPopup() :
{
mSkillName->setFont(boldFont);
mSkillName->setPosition(0, 0);
- mSkillName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mSkillName->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
const int fontHeight = getFont()->getHeight();
mSkillDesc->setEditable(false);
mSkillDesc->setPosition(0, fontHeight);
- mSkillDesc->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mSkillDesc->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
mSkillEffect->setEditable(false);
mSkillEffect->setPosition(0, 2 * fontHeight);
- mSkillEffect->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mSkillEffect->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
mSkillLevel->setEditable(false);
mSkillLevel->setPosition(0, 3 * fontHeight);
- mSkillLevel->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mSkillLevel->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
mSkillCastType->setEditable(false);
mSkillCastType->setPosition(0, 4 * fontHeight);
- mSkillCastType->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mSkillCastType->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
}
void SkillPopup::postInit()
diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp
index f4c74cfae..b4da99cc7 100644
--- a/src/gui/popups/speechbubble.cpp
+++ b/src/gui/popups/speechbubble.cpp
@@ -48,8 +48,9 @@ SpeechBubble::SpeechBubble() :
mCaption->setFont(boldFont);
mSpeechBox->setOpaque(Opaque_false);
- mSpeechBox->setForegroundColorAll(getThemeColor(ThemeColorId::BUBBLE_TEXT),
- getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE));
+ mSpeechBox->setForegroundColorAll(
+ getThemeColor(ThemeColorId::BUBBLE_TEXT, 255U),
+ getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE, 255U));
}
void SpeechBubble::postInit()
@@ -73,8 +74,9 @@ void SpeechBubble::setText(const std::string &text, const bool showName)
if (text == mText && (mCaption->getWidth() <= mSpeechBox->getWidth()))
return;
- mSpeechBox->setForegroundColorAll(getThemeColor(ThemeColorId::BUBBLE_TEXT),
- getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE));
+ mSpeechBox->setForegroundColorAll(
+ getThemeColor(ThemeColorId::BUBBLE_TEXT, 255U),
+ getThemeColor(ThemeColorId::BUBBLE_TEXT_OUTLINE, 255U));
int width = mCaption->getWidth();
mSpeechBox->clearRows();
diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp
index 16169d81e..bb7d5d87a 100644
--- a/src/gui/popups/spellpopup.cpp
+++ b/src/gui/popups/spellpopup.cpp
@@ -39,10 +39,12 @@ SpellPopup::SpellPopup() :
mItemComment(new Label(this))
{
mItemName->setFont(boldFont);
- mItemName->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
- mItemComment->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ mItemName->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
+ mItemComment->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
}
void SpellPopup::postInit()
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index 544a37b56..7f0deee2d 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -39,8 +39,9 @@
{ \
Label *const label = mLabels[num]; \
label->setPosition(0, y); \
- label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP), \
- getThemeColor(ThemeColorId::POPUP_OUTLINE)); \
+ label->setForegroundColorAll( \
+ getThemeColor(ThemeColorId::POPUP, 255U), \
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U)); \
add(label); \
y += fontHeight; \
}
diff --git a/src/gui/popups/textpopup.cpp b/src/gui/popups/textpopup.cpp
index c8b951aea..6714661b0 100644
--- a/src/gui/popups/textpopup.cpp
+++ b/src/gui/popups/textpopup.cpp
@@ -47,8 +47,9 @@ void TextPopup::postInit()
Label *const label = new Label(this);
mText[f] = label;
label->setPosition(0, y);
- label->setForegroundColorAll(getThemeColor(ThemeColorId::POPUP),
- getThemeColor(ThemeColorId::POPUP_OUTLINE));
+ label->setForegroundColorAll(
+ getThemeColor(ThemeColorId::POPUP, 255U),
+ getThemeColor(ThemeColorId::POPUP_OUTLINE, 255U));
add(label);
y += fontHeight;
}