feat(tooltip): ElvUI style without ElvUI; source in secondary only; fix learner source label
- ElvUI tooltip style: new 'ElvUI tooltip style' option (General tab, on by default) skins GameTooltip/WorldMapTooltip/ItemRefTooltip/shopping tooltips and the secondary learner frame with ElvUI's transparent flat look (dark bg + thin 1px border) when ElvUI is not installed. Corrected the secondary frame fallback that used the chunky WoW border. No-op when ElvUI is loaded. - Source attribution now shows ONLY inside the secondary learner tooltip when 'Use secondary learner tooltip' is enabled; removed from the main NPC/object/ item tooltip and gated off entirely when the secondary tooltip is disabled (map-pin source gated the same way). - Fixed learner-learned pins mislabelled 'AscensionDB': GetPinDataSource is now mode-aware and returns 'Learner' in learner mode when the entity has a learner record, even if AscensionDB also curates it (curated coords are discarded by GetNPC/GetObject in learner mode anyway). Test-neutral (145 successes / same 7 pre-existing failures + 1 error).
This commit is contained in:
@@ -329,11 +329,9 @@ function _QuestieTooltips:AddUnitDataToTooltip()
|
||||
end
|
||||
end
|
||||
|
||||
-- Data-source attribution (opt-in; internally gated and nil when source unknown).
|
||||
local npcSourceLine = QuestieTooltips:GetDataSourceLine("m_" .. npcId)
|
||||
if npcSourceLine then
|
||||
GameTooltip:AddLine(npcSourceLine)
|
||||
end
|
||||
-- Data-source attribution is rendered by QuestieLearner's secondary tooltip frame
|
||||
-- (only when the secondary learner tooltip is enabled), never inline in the main
|
||||
-- tooltip — see _AddLearnedSpawnTooltipLine.
|
||||
|
||||
local npcNum = tonumber(npcId)
|
||||
if npcNum then
|
||||
@@ -400,11 +398,6 @@ function _QuestieTooltips:AddItemDataToTooltip()
|
||||
self:AddLine(v)
|
||||
end
|
||||
end
|
||||
-- Data-source attribution (opt-in; internally gated and nil when source unknown).
|
||||
local itemSourceLine = QuestieTooltips:GetDataSourceLine("i_" .. (itemId or 0))
|
||||
if itemSourceLine then
|
||||
self:AddLine(itemSourceLine)
|
||||
end
|
||||
QuestieTooltips.lastGametooltipCount = _QuestieTooltips:CountTooltip()
|
||||
end
|
||||
lastItemId = itemId;
|
||||
@@ -459,14 +452,6 @@ function _QuestieTooltips:AddObjectDataToTooltip(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Data-source attribution for the hovered object (opt-in; nil when unknown).
|
||||
local firstObjectId = lookup[1]
|
||||
if firstObjectId then
|
||||
local objSourceLine = QuestieTooltips:GetDataSourceLine("o_" .. firstObjectId)
|
||||
if objSourceLine then
|
||||
GameTooltip:AddLine(objSourceLine)
|
||||
end
|
||||
end
|
||||
if QuestieTooltips.ResizeTooltip then
|
||||
QuestieTooltips:ResizeTooltip(GameTooltip)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user