diff options
-rw-r--r-- | src/gui/popups/itempopup.cpp | 3 | ||||
-rw-r--r-- | src/gui/popups/itempopup.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/shoplistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 2 |
9 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index c05073750..72fd3e0bd 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -77,7 +77,10 @@ ItemPopup::ItemPopup() : mItemWeight->setPosition(0, 3 * fontHeight); mItemWeight->setForegroundColorAll(getThemeColor(Theme::POPUP), getThemeColor(Theme::POPUP_OUTLINE)); +} +void ItemPopup::postInit() +{ add(mItemName); add(mItemDesc); add(mItemEffect); diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h index 5c06cbf5a..4902a97b0 100644 --- a/src/gui/popups/itempopup.h +++ b/src/gui/popups/itempopup.h @@ -50,6 +50,8 @@ class ItemPopup final : public Popup */ ~ItemPopup(); + void postInit() override; + /** * Sets the info to be displayed given a particular item. */ diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index 92daf8b77..d8f2f1d68 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -49,6 +49,8 @@ DropShortcutContainer::DropShortcutContainer(): mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)), mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)) { + mItemPopup->postInit(); + addMouseListener(this); addWidgetListener(this); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 217e30735..8754210f8 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -195,6 +195,7 @@ ItemContainer::ItemContainer(const Widget2 *const widget, mSwapItems(false), mDescItems(false) { + mItemPopup->postInit(); setFocusable(true); addKeyListener(this); addMouseListener(this); diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 18eccecb1..bca0585a1 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -66,6 +66,7 @@ namespace ItemLinkHandler::ItemLinkHandler() : mItemPopup(new ItemPopup) { + mItemPopup->postInit(); } ItemLinkHandler::~ItemLinkHandler() diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 87ce28fe0..d85a1e73e 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -60,6 +60,8 @@ ItemShortcutContainer::ItemShortcutContainer(const unsigned number) : mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)), mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)) { + mItemPopup->postInit(); + addMouseListener(this); addWidgetListener(this); diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index d0ff4e746..cc622653d 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -56,6 +56,7 @@ ShopListBox::ShopListBox(const Widget2 *const widget, mPriceCheck(true), mProtectItems(false) { + mItemPopup->postInit(); mHighlightColor = getThemeColor(Theme::HIGHLIGHT); mForegroundColor = getThemeColor(Theme::LISTBOX); } @@ -73,6 +74,7 @@ ShopListBox::ShopListBox(const Widget2 *const widget, mPriceCheck(true), mProtectItems(false) { + mItemPopup->postInit(); mHighlightColor = getThemeColor(Theme::HIGHLIGHT); mForegroundColor = getThemeColor(Theme::LISTBOX); } diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index 9b4082f7f..688fb814a 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -86,6 +86,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment, mMaxX(0), mMaxY(0) { + mItemPopup->postInit(); if (setupWindow) setupWindow->registerWindowForReset(this); diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 0c0f0bfe2..6fd813183 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -155,6 +155,8 @@ ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent, mPrice(0), mEnabledKeyboard(keyboard.isEnabled()) { + mItemPopup->postInit(); + if (!mItem) return; |