summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
commitd97189f055798b5b2051c1c5770a3def62747461 (patch)
treed66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/gui/widgets/itemshortcutcontainer.cpp
parent25dce1399e40f24809842303d48ef090439de1e5 (diff)
downloadplus-d97189f055798b5b2051c1c5770a3def62747461.tar.gz
plus-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2
plus-d97189f055798b5b2051c1c5770a3def62747461.tar.xz
plus-d97189f055798b5b2051c1c5770a3def62747461.zip
Improve perfomance in some object constructors.
Diffstat (limited to 'src/gui/widgets/itemshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 735cea43d..e27d5efd6 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -54,14 +54,15 @@ ItemShortcutContainer::ItemShortcutContainer(unsigned number):
ShortcutContainer(),
mItemClicked(false),
mItemMoved(nullptr),
- mNumber(number)
+ mNumber(number),
+ mItemPopup(new ItemPopup),
+ mSpellPopup(new SpellPopup),
+ mEquipedColor(Theme::getThemeColor(Theme::ITEM_EQUIPPED)),
+ mUnEquipedColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED))
{
addMouseListener(this);
addWidgetListener(this);
- mItemPopup = new ItemPopup;
- mSpellPopup = new SpellPopup;
-
mBackgroundImg = Theme::getImageFromThemeXml(
"item_shortcut_background.xml");
if (itemShortcut[mNumber])
@@ -81,8 +82,6 @@ ItemShortcutContainer::ItemShortcutContainer(unsigned number):
mBoxWidth = 1;
}
setForegroundColor(Theme::getThemeColor(Theme::TEXT));
- mEquipedColor = Theme::getThemeColor(Theme::ITEM_EQUIPPED);
- mUnEquipedColor = Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED);
}
ItemShortcutContainer::~ItemShortcutContainer()