summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-17 15:17:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-17 15:17:20 +0300
commite10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158 (patch)
tree55d6d087af2afc6d9f14859e4c98a5ecf49dd020
parent974eff0d1607d9f2648ecd9fbb3abfd53aa6bec4 (diff)
downloadplus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.tar.gz
plus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.tar.bz2
plus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.tar.xz
plus-e10d8e83762aa4d1662e8c40d3ef7bbbf9d6a158.zip
Use public item popup in dropshortcutcontainer.
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp18
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h1
2 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 8fe3a8b2b..9d423f8ac 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -48,14 +48,11 @@
DropShortcutContainer::DropShortcutContainer(Widget2 *const widget) :
ShortcutContainer(widget),
mItemClicked(false),
- mItemPopup(new ItemPopup),
mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE))
{
- mItemPopup->postInit();
-
if (dropShortcut)
mMaxItems = dropShortcut->getItemCount();
else
@@ -64,7 +61,6 @@ DropShortcutContainer::DropShortcutContainer(Widget2 *const widget) :
DropShortcutContainer::~DropShortcutContainer()
{
- delete2(mItemPopup);
}
void DropShortcutContainer::setWidget2(const Widget2 *const widget)
@@ -281,23 +277,23 @@ void DropShortcutContainer::mouseMoved(MouseEvent &event)
if (item && viewport)
{
- mItemPopup->setItem(item);
- mItemPopup->position(viewport->getMouseX(), viewport->getMouseY());
+ itemPopup->setItem(item);
+ itemPopup->position(viewport->getMouseX(), viewport->getMouseY());
}
else
{
- mItemPopup->setVisible(false);
+ itemPopup->setVisible(false);
}
}
void DropShortcutContainer::mouseExited(MouseEvent &event A_UNUSED)
{
- if (mItemPopup)
- mItemPopup->setVisible(false);
+ if (itemPopup)
+ itemPopup->setVisible(false);
}
void DropShortcutContainer::widgetHidden(const Event &event A_UNUSED)
{
- if (mItemPopup)
- mItemPopup->setVisible(false);
+ if (itemPopup)
+ itemPopup->setVisible(false);
}
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index 1888292de..84d85c6c0 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -78,7 +78,6 @@ class DropShortcutContainer final : public ShortcutContainer
private:
bool mItemClicked;
- ItemPopup *mItemPopup;
Color mEquipedColor;
Color mEquipedColor2;
Color mUnEquipedColor;