style(tracker): tighten the gutter ahead of a quest title
The collapse button moves to 4px from the quest text, the marker to 1px from the collapse button, and the quest item buttons 6px in from the edge of the line. Everything ahead of the title is that much closer to it, so the marker, which tucks in to the left of whichever of those it finds, hangs less far over the tracker's edge -- at the default sizes it no longer reaches past it at all when the quest has no item button. The item button offset lives in TrackerLinePool now: the marker is placed against it, so the two cannot drift apart.
This commit is contained in:
@@ -974,7 +974,7 @@ function QuestieTracker:Update()
|
||||
line.criteriaMark:Hide()
|
||||
|
||||
-- Set Min/Max Button and default states
|
||||
line.expandQuest:SetPoint("TOPRIGHT", line, "TOPLEFT", questMarginLeft - 8, 1)
|
||||
line.expandQuest:SetPoint("TOPRIGHT", line, "TOPLEFT", questMarginLeft - 4, 1)
|
||||
line.expandQuest.zoneId = zoneName
|
||||
|
||||
|
||||
@@ -1179,7 +1179,8 @@ function QuestieTracker:Update()
|
||||
end
|
||||
|
||||
-- Attach button to Quest Title linePool
|
||||
button:SetPoint("TOPLEFT", button.line, "TOPLEFT", 0, 0)
|
||||
button:SetPoint("TOPLEFT", button.line, "TOPLEFT",
|
||||
TrackerLinePool.GetItemButtonOffset(), 0)
|
||||
button:SetParent(button.line)
|
||||
button:Show()
|
||||
|
||||
@@ -1291,7 +1292,7 @@ function QuestieTracker:Update()
|
||||
|
||||
-- Attach button to Quest Title linePool
|
||||
altButton:SetPoint("TOPLEFT", altButton.line, "TOPLEFT",
|
||||
2 + questItemButtonSize, 0)
|
||||
TrackerLinePool.GetItemButtonOffset() + 2 + questItemButtonSize, 0)
|
||||
altButton:SetParent(altButton.line)
|
||||
altButton:Show()
|
||||
|
||||
@@ -1739,7 +1740,7 @@ function QuestieTracker:Update()
|
||||
|
||||
-- Set Min/Max Button and default states
|
||||
line.expandQuest:Show()
|
||||
line.expandQuest:SetPoint("TOPRIGHT", line, "TOPLEFT", questMarginLeft - 8, 1)
|
||||
line.expandQuest:SetPoint("TOPRIGHT", line, "TOPLEFT", questMarginLeft - 4, 1)
|
||||
line.expandQuest.zoneId = zoneName
|
||||
|
||||
-- The minAllQuestsInZone table is always blank until a player Shift+Clicks the Zone header (MouseDown).
|
||||
|
||||
@@ -116,12 +116,20 @@ local buttonPool = {}
|
||||
local lineMarginLeft = 10
|
||||
|
||||
-- Gap kept between the supertrack button and whatever it is tucked in next to.
|
||||
local superTrackButtonGap = 2
|
||||
local superTrackButtonGap = 1
|
||||
|
||||
-- Left edge of a quest line's collapse button. QuestieTracker anchors it at questMarginLeft - 8
|
||||
-- Left edge of a quest line's collapse button. QuestieTracker anchors it at questMarginLeft - 4
|
||||
-- with a width of trackerFontSizeQuest, and questMarginLeft carries a matching + trackerFontSizeQuest,
|
||||
-- so it lands on a flat 18 whatever the font size is.
|
||||
local superTrackCollapseButtonLeft = 18
|
||||
-- so it lands on a flat 22 whatever the font size is.
|
||||
local superTrackCollapseButtonLeft = 22
|
||||
|
||||
-- Left edge of the quest item buttons. QuestieTracker anchors them there and the marker tucks in
|
||||
-- to the left of them, so the two have to agree on it.
|
||||
local questItemButtonLeft = 6
|
||||
|
||||
function TrackerLinePool.GetItemButtonOffset()
|
||||
return questItemButtonLeft
|
||||
end
|
||||
|
||||
---@param questFrame Frame
|
||||
function TrackerLinePool.Initialize(questFrame)
|
||||
@@ -541,7 +549,7 @@ function TrackerLinePool.Initialize(questFrame)
|
||||
superTrackButton.AnchorSuperTrackButton = function(self)
|
||||
local buttonSize = Questie.db.profile.trackerSuperTrackButtonSize or 25
|
||||
local blockHeight = self.blockHeight or Questie.db.profile.trackerFontSizeQuest
|
||||
local slotLeft = self.itemButtonShown and 0 or superTrackCollapseButtonLeft
|
||||
local slotLeft = self.itemButtonShown and questItemButtonLeft or superTrackCollapseButtonLeft
|
||||
local offsetX = slotLeft - superTrackButtonGap - buttonSize
|
||||
|
||||
-- The lines live inside the tracker's scroll frame, which clips anything hanging over
|
||||
|
||||
Reference in New Issue
Block a user