From 48a9ba3a409e96d5f8a658d315a533f93864fba7 Mon Sep 17 00:00:00 2001 From: MilleXIV Date: Mon, 5 Sep 2016 10:44:19 -0400 Subject: [PATCH] Updating popup position for top bars --- modules/travel.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/travel.lua b/modules/travel.lua index 97aeebd..e08b830 100644 --- a/modules/travel.lua +++ b/modules/travel.lua @@ -410,7 +410,20 @@ function TravelModule:Refresh() self:SetPortColor() self:CreatePortPopup() - self.portPopup:SetPoint('BOTTOM', self.portButton, 'TOP', 0, xb.constants.popupPadding) + + local popupPadding = xb.constants.popupPadding + local popupPoint = 'BOTTOM' + local relPoint = 'TOP' + if db.general.barPosition == 'TOP' then + popupPadding = -(popupPadding) + popupPoint = 'TOP' + relPoint = 'BOTTOM' + end + + self.portPopup:ClearAllPoints() + self.popupTexture:ClearAllPoints() + + self.portPopup:SetPoint(popupPoint, self.portButton, relPoint, 0, popupPadding) self.popupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a) self.popupTexture:SetAllPoints() self.portPopup:Hide() -- 1.7.9.5