diff --git a/OctoBus.lua b/OctoBus.lua index 68d3f8a..f8c27d1 100644 --- a/OctoBus.lua +++ b/OctoBus.lua @@ -990,7 +990,7 @@ local OB_OK, OB_ERR = pcall(function () local textScale = CFG.textScale or 1 local WIDTH = math.floor(280 * textScale * (CFG.widthScale or 1) + 0.5) local ROW_H = math.floor(18 * textScale + 0.5) - local TOP = math.floor(26 * textScale + 0.5) + local TOP = math.floor(14 + 18 * textScale + 0.5) local panel = CreateFrame("Frame", "OctoBusPanel", UIParent) panel:SetFrameStrata("MEDIUM") @@ -1003,11 +1003,29 @@ local OB_OK, OB_ERR = pcall(function () CreateBackdrop(panel) panel.title = panel:CreateFontString(nil, "OVERLAY") - panel.title:SetFont(font, 10) - panel.title:SetPoint("TOPLEFT", panel, "TOPLEFT", 10, -9) + panel.title:SetFont(font, 13) + panel.title:SetPoint("TOP", panel, "TOP", 0, -8) panel.title:SetTextColor(1, 0.82, 0) panel.title:SetText("Transports") + -- thin silver rule under the title that fades out toward both edges + panel.divL = panel:CreateTexture(nil, "ARTWORK") + panel.divR = panel:CreateTexture(nil, "ARTWORK") + panel.divL:SetTexture("Interface\\Buttons\\WHITE8X8") + panel.divR:SetTexture("Interface\\Buttons\\WHITE8X8") + panel.divL:SetHeight(1) + panel.divR:SetHeight(1) + panel.divL:SetPoint("TOPLEFT", panel, "TOPLEFT", 10, 0) + panel.divL:SetPoint("RIGHT", panel, "CENTER", 0, 0) + panel.divR:SetPoint("TOPRIGHT", panel, "TOPRIGHT", -10, 0) + panel.divR:SetPoint("LEFT", panel, "CENTER", 0, 0) + local function PlaceDivider(y, a) + panel.divL:SetPoint("TOPLEFT", panel, "TOPLEFT", 10, y) + panel.divR:SetPoint("TOPRIGHT", panel, "TOPRIGHT", -10, y) + panel.divL:SetGradientAlpha("HORIZONTAL", 0.8, 0.8, 0.8, 0, 0.8, 0.8, 0.8, a) + panel.divR:SetGradientAlpha("HORIZONTAL", 0.8, 0.8, 0.8, a, 0.8, 0.8, 0.8, 0) + end + panel.status = panel:CreateFontString(nil, "OVERLAY") panel.status:SetFont(font, 9) panel.status:SetPoint("TOPRIGHT", panel, "TOPRIGHT", -10, -10) @@ -1045,9 +1063,8 @@ local OB_OK, OB_ERR = pcall(function () -- click the title: switch between all routes and routes for where you are local titleBtn = CreateFrame("Button", nil, panel) - titleBtn:SetPoint("TOPLEFT", panel, "TOPLEFT", 6, -5) - titleBtn:SetWidth(150) - titleBtn:SetHeight(16) + titleBtn:SetPoint("TOPLEFT", panel.title, "TOPLEFT", -6, 4) + titleBtn:SetPoint("BOTTOMRIGHT", panel.title, "BOTTOMRIGHT", 6, -4) titleBtn:RegisterForClicks("LeftButtonUp") titleBtn:RegisterForDrag("LeftButton") titleBtn:SetScript("OnDragStart", StartDrag) @@ -1291,9 +1308,10 @@ local OB_OK, OB_ERR = pcall(function () textScale = CFG.textScale or 1 WIDTH = math.floor(280 * textScale * (CFG.widthScale or 1) + 0.5) ROW_H = math.floor(18 * textScale + 0.5) - TOP = math.floor(26 * textScale + 0.5) + TOP = math.floor(14 + 18 * textScale + 0.5) panel:SetWidth(WIDTH) - StyleText(panel.title, math.floor(10 * textScale + 0.5)) + StyleText(panel.title, math.floor(13 * textScale + 0.5)) + PlaceDivider(-(TOP - 5), 0.6 * math.min(1, bg + 0.25) * wa) StyleText(panel.status, math.floor(9 * textScale + 0.5)) StyleText(panel.foot, math.floor(9 * textScale + 0.5)) for i = 1, table.getn(rows) do PlaceRow(rows[i], i) end