summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-06 14:49:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-06 14:49:47 +0300
commitc649cf883480071c9b93909c4ea4ee5ec98155b2 (patch)
tree71022fd2db59c643c19c78c5524ffcd038e35a7f /src/gui/widgets/itemshortcutcontainer.cpp
parent4cab6fc78e19799f223d951d5ccc9afb303b65f2 (diff)
downloadmanaplus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.gz
manaplus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.bz2
manaplus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.xz
manaplus-c649cf883480071c9b93909c4ea4ee5ec98155b2.zip
Remove some duplicate code.
Diffstat (limited to 'src/gui/widgets/itemshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 670807ed5..51a1cef13 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -68,38 +68,14 @@ ItemShortcutContainer::ItemShortcutContainer(Widget2 *const widget,
mItemPopup->postInit();
mSpellPopup->postInit();
- addMouseListener(this);
- addWidgetListener(this);
-
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
- mBackgroundImg = Theme::getImageFromThemeXml(
- "item_shortcut_background.xml", "background.xml");
if (itemShortcut[mNumber])
mMaxItems = itemShortcut[mNumber]->getItemCount();
else
mMaxItems = 0;
-
- if (mBackgroundImg)
- {
- mBackgroundImg->setAlpha(settings.guiAlpha);
- mBoxHeight = mBackgroundImg->getHeight();
- mBoxWidth = mBackgroundImg->getWidth();
- }
- else
- {
- mBoxHeight = 1;
- mBoxWidth = 1;
- }
- mForegroundColor = getThemeColor(Theme::TEXT);
}
ItemShortcutContainer::~ItemShortcutContainer()
{
- if (mBackgroundImg)
- {
- mBackgroundImg->decRef();
- mBackgroundImg = nullptr;
- }
delete2(mItemPopup);
delete2(mSpellPopup);
}