fix(tooltip): copy ElvUI's exact tooltip border (pixel-perfect, even)
The previous ElvUI-style border was too thick and uneven (thicker at the
top): it used Interface\ChatFrame\ChatFrameBackground with edgeSize = 1 UI
*unit*, which renders several physical pixels thick at the user's UI scale,
and a 1x1 texture that samples unevenly along edges.
Now copies ElvUI/Core/Toolkit.lua SetTemplate exactly: the blank texture
E.media.blankTex (Interface\Buttons\WHITE8X8) for bg + edge, and edgeSize =
E.mult (one physical pixel = (768 / screenHeight) / uiScale) so the border
is a true even 1px. Colors unchanged (ElvUI defaults the user runs):
backdropfadecolor {0.06,0.06,0.06} @ colorAlpha 0.8, bordercolor black.
Factored into QuestieTooltips:ApplyElvUISkin so the secondary learner frame
and the default tooltips share one implementation.
This commit is contained in:
@@ -4628,24 +4628,13 @@ local function _ApplyElvUIStyleTooltip(frame)
|
||||
return
|
||||
end
|
||||
end
|
||||
-- ElvUI "Transparent" template — see ElvUI/Core/Toolkit.lua SetTemplate and
|
||||
-- ElvUI/Settings/Profile.lua:29-31. ElvUI uses a FLAT texture for both the
|
||||
-- background and the border with a 1px (E.mult) edge, NOT the chunky default
|
||||
-- WoW tooltip border — so use a solid texture and edgeSize 1 to match.
|
||||
-- Without ElvUI: apply the exact ElvUI "Transparent" template via the shared skinner
|
||||
-- (WHITE8X8 texture, 1-physical-pixel edge, backdropfadecolor + black border).
|
||||
if not frame.SetBackdrop then return end
|
||||
local FLAT = "Interface\\ChatFrame\\ChatFrameBackground" -- solid 1x1 texture on 3.3.5
|
||||
frame:SetBackdrop({
|
||||
bgFile = FLAT,
|
||||
edgeFile = FLAT,
|
||||
tile = false,
|
||||
tileSize = 0,
|
||||
edgeSize = 1,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
||||
})
|
||||
-- (0.06, 0.06, 0.06, 0.8) — ElvUI's default backdropfadecolor
|
||||
frame:SetBackdropColor(0.06, 0.06, 0.06, 0.8)
|
||||
-- Black border (ElvUI's default bordercolor is {0, 0, 0})
|
||||
frame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
local QuestieTooltips = QuestieLoader:ImportModule("QuestieTooltips")
|
||||
if QuestieTooltips and QuestieTooltips.ApplyElvUISkin then
|
||||
QuestieTooltips:ApplyElvUISkin(frame)
|
||||
end
|
||||
|
||||
-- Apply the same font ElvUI uses by default. FontTemplate isn't available
|
||||
-- without ElvUI, so set font + shadow directly.
|
||||
|
||||
Reference in New Issue
Block a user