From c649cf883480071c9b93909c4ea4ee5ec98155b2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 6 Jun 2014 14:49:47 +0300 Subject: Remove some duplicate code. --- src/gui/widgets/spellshortcutcontainer.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/gui/widgets/spellshortcutcontainer.cpp') diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 014fa4354..08e22ee98 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -50,37 +50,14 @@ SpellShortcutContainer::SpellShortcutContainer(Widget2 *const widget, { mSpellPopup->postInit(); - addMouseListener(this); - addWidgetListener(this); - - mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE); - - mBackgroundImg = Theme::getImageFromThemeXml( - "item_shortcut_background.xml", "background.xml"); if (spellShortcut) mMaxItems = spellShortcut->getSpellsCount(); else mMaxItems = 0; - - if (mBackgroundImg) - { - mBackgroundImg->setAlpha(settings.guiAlpha); - mBoxHeight = mBackgroundImg->getHeight(); - mBoxWidth = mBackgroundImg->getWidth(); - } - else - { - mBoxHeight = 1; - mBoxWidth = 1; - } - mForegroundColor = getThemeColor(Theme::TEXT); } SpellShortcutContainer::~SpellShortcutContainer() { - if (mBackgroundImg) - mBackgroundImg->decRef(); - mBackgroundImg = nullptr; delete2(mSpellPopup); } -- cgit v1.2.3-60-g2f50