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:
2026-07-30 18:26:42 +02:00
parent 706fc0b8ad
commit c6019ea823
2 changed files with 18 additions and 9 deletions
+5 -4
View File
@@ -974,7 +974,7 @@ function QuestieTracker:Update()
line.criteriaMark:Hide() line.criteriaMark:Hide()
-- Set Min/Max Button and default states -- 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 line.expandQuest.zoneId = zoneName
@@ -1179,7 +1179,8 @@ function QuestieTracker:Update()
end end
-- Attach button to Quest Title linePool -- 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:SetParent(button.line)
button:Show() button:Show()
@@ -1291,7 +1292,7 @@ function QuestieTracker:Update()
-- Attach button to Quest Title linePool -- Attach button to Quest Title linePool
altButton:SetPoint("TOPLEFT", altButton.line, "TOPLEFT", altButton:SetPoint("TOPLEFT", altButton.line, "TOPLEFT",
2 + questItemButtonSize, 0) TrackerLinePool.GetItemButtonOffset() + 2 + questItemButtonSize, 0)
altButton:SetParent(altButton.line) altButton:SetParent(altButton.line)
altButton:Show() altButton:Show()
@@ -1739,7 +1740,7 @@ function QuestieTracker:Update()
-- Set Min/Max Button and default states -- Set Min/Max Button and default states
line.expandQuest:Show() 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 line.expandQuest.zoneId = zoneName
-- The minAllQuestsInZone table is always blank until a player Shift+Clicks the Zone header (MouseDown). -- The minAllQuestsInZone table is always blank until a player Shift+Clicks the Zone header (MouseDown).
+13 -5
View File
@@ -116,12 +116,20 @@ local buttonPool = {}
local lineMarginLeft = 10 local lineMarginLeft = 10
-- Gap kept between the supertrack button and whatever it is tucked in next to. -- 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, -- with a width of trackerFontSizeQuest, and questMarginLeft carries a matching + trackerFontSizeQuest,
-- so it lands on a flat 18 whatever the font size is. -- so it lands on a flat 22 whatever the font size is.
local superTrackCollapseButtonLeft = 18 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 ---@param questFrame Frame
function TrackerLinePool.Initialize(questFrame) function TrackerLinePool.Initialize(questFrame)
@@ -541,7 +549,7 @@ function TrackerLinePool.Initialize(questFrame)
superTrackButton.AnchorSuperTrackButton = function(self) superTrackButton.AnchorSuperTrackButton = function(self)
local buttonSize = Questie.db.profile.trackerSuperTrackButtonSize or 25 local buttonSize = Questie.db.profile.trackerSuperTrackButtonSize or 25
local blockHeight = self.blockHeight or Questie.db.profile.trackerFontSizeQuest 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 local offsetX = slotLeft - superTrackButtonGap - buttonSize
-- The lines live inside the tracker's scroll frame, which clips anything hanging over -- The lines live inside the tracker's scroll frame, which clips anything hanging over