Skip to content

Commit

Permalink
fix(tooltip): follow scaling value of UIParent
Browse files Browse the repository at this point in the history
  • Loading branch information
ffainy committed Mar 13, 2023
1 parent 125d58f commit 9cfdc6d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/modules/tooltip/style.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ function TOOLTIP:ReskinTooltip()
return
end

self:SetScale(1)
self:SetScale(_G.UIParent:GetScale())

if not self.tipStyled then
self:HideBackdrop()
self:DisableDrawLayer('BACKGROUND')
self.bg = F.SetBD(self)
self.bg:SetInside(self)
self.bg:SetFrameLevel(self:GetFrameLevel())

local color = _G.ANDROMEDA_ADB.BackdropColor
local alpha = C.DB.Tooltip.BackdropAlpha
self.bg:SetBackdropBorderColor(color.r, color.g, color.b, alpha)
Expand Down Expand Up @@ -163,17 +164,13 @@ TOOLTIP:RegisterTooltips(C.ADDON_NAME, function()
_G.IMECandidatesFrame,
_G.QuickKeybindTooltip,
_G.GameSmallHeaderTooltip,
_G.SettingsTooltip,
}

for _, f in pairs(tooltips) do
f:HookScript('OnShow', TOOLTIP.ReskinTooltip)
end

if _G.SettingsTooltip then
TOOLTIP.ReskinTooltip(_G.SettingsTooltip)
_G.SettingsTooltip:SetScale(_G.UIParent:GetScale())
end

-- DropdownMenu
local dropdowns = { 'DropDownList', 'L_DropDownList', 'Lib_DropDownList' }
local function reskinDropdown()
Expand Down

0 comments on commit 9cfdc6d

Please sign in to comment.