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:
@@ -562,14 +562,32 @@ function QuestieOptions.tabs.general:Initialize()
|
||||
type = "toggle",
|
||||
order = 8.605,
|
||||
name = function() return l10n('Show data source'); end,
|
||||
desc = function() return l10n('Adds a "Source:" line to NPC, object and map-pin tooltips showing where the data came from (Questie DB, AscensionDB, Learner, Townsfolk, Comms). Only shown when the source is actually known.'); end,
|
||||
desc = function() return l10n('Adds a "Source:" line (Questie DB, AscensionDB, Learner, Townsfolk, Comms) inside the secondary learner tooltip. Requires "Use secondary learner tooltip"; never shown in the main tooltip and not shown at all when the secondary tooltip is disabled. Only shown when the source is actually known.'); end,
|
||||
width = 1.5,
|
||||
disabled = function() return not Questie.db.profile.enableTooltips; end,
|
||||
disabled = function() return not (Questie.db.profile.enableTooltips and Questie.db.profile.learnerTooltipUseSecondary == true); end,
|
||||
get = function() return Questie.db.profile.enableTooltipsSource == true end,
|
||||
set = function(_, value)
|
||||
Questie.db.profile.enableTooltipsSource = value
|
||||
end
|
||||
},
|
||||
elvuiStyleTooltips = {
|
||||
type = "toggle",
|
||||
order = 8.606,
|
||||
name = function() return l10n('ElvUI tooltip style'); end,
|
||||
desc = function() return l10n('Skin Questie tooltips (NPC/item/map-pin and the secondary learner tooltip) with the ElvUI transparent style even when ElvUI is not installed. Has no effect when ElvUI is loaded, since ElvUI skins them itself. Takes full effect after a reload.'); end,
|
||||
width = 1.5,
|
||||
disabled = function() return not Questie.db.profile.enableTooltips; end,
|
||||
get = function() return Questie.db.profile.elvuiStyleTooltips ~= false end,
|
||||
set = function(_, value)
|
||||
Questie.db.profile.elvuiStyleTooltips = value
|
||||
if value then
|
||||
local QuestieTooltips = QuestieLoader:ImportModule("QuestieTooltips")
|
||||
if QuestieTooltips and QuestieTooltips.SkinDefaultTooltips then
|
||||
QuestieTooltips:SkinDefaultTooltips()
|
||||
end
|
||||
end
|
||||
end
|
||||
},
|
||||
partyOnlyToggle = {
|
||||
type = "toggle",
|
||||
order = 8.61,
|
||||
|
||||
Reference in New Issue
Block a user