diff --git a/Aptechka.lua b/Aptechka.lua index 0b60d52..c104b9a 100644 --- a/Aptechka.lua +++ b/Aptechka.lua @@ -269,6 +269,8 @@ local defaults = { customBackgroundColorPower = {0.5, 0.5, 1}, petColor = {1, 0.5, 0.5}, alphaOutOfRange = 0.45, + selBorderWidth = 2, + selBorderInset = 0, scale = 1, --> into debuffBossScale = 1.3, diff --git a/Options/ProfileSettings.lua b/Options/ProfileSettings.lua index 4626908..25660ee 100644 --- a/Options/ProfileSettings.lua +++ b/Options/ProfileSettings.lua @@ -606,6 +606,32 @@ function ns.MakeProfileSettings() end, order = 14.7, }, + selBorderWidth = { + name = L"Sel.Border Width", + type = "range", + get = function(info) return Aptechka.db.profile.selBorderWidth end, + set = function(info, v) + Aptechka.db.profile.selBorderWidth = v + Aptechka:ReconfigureUnprotected() + end, + min = 1, + max = 10, + step = 0.1, + order = 14.71, + }, + selBorderInset = { + name = L"Sel.Border Inset", + type = "range", + get = function(info) return Aptechka.db.profile.selBorderInset end, + set = function(info, v) + Aptechka.db.profile.selBorderInset = v + Aptechka:ReconfigureUnprotected() + end, + min = 0, + max = 7, + step = 0.1, + order = 14.72, + }, healthColorGroup = { diff --git a/border.tga b/border.tga index 39f8849..977369f 100644 Binary files a/border.tga and b/border.tga differ diff --git a/frame.lua b/frame.lua index bf6fd21..923c5be 100644 --- a/frame.lua +++ b/frame.lua @@ -2796,9 +2796,16 @@ end local border_backdrop = { - edgeFile = "Interface\\Addons\\Aptechka\\border", tileEdge = true, edgeSize = 14, - insets = {left = -2, right = -2, top = -2, bottom = -2}, + edgeFile = "Interface\\Addons\\Aptechka\\border", tileEdge = true, edgeSize = 7, } +local function Border_SetSize(parent, border, borderWidth, outboundRange) + border.backdropInfo.edgeSize = 3.5 * borderWidth + local outlineSize = pixelperfect(Aptechka.db.global.borderWidth) + local p4 = outlineSize + pixelperfect(2) + outboundRange + border:SetPoint("TOPLEFT", parent, "TOPLEFT", -p4, p4) + border:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", p4, -p4) + border:ApplyBackdrop() +end local Border_SetJob = function(self, job, state, contentType, ...) local timerType, cur, max, count, icon, text, r,g,b, texture, texCoords = NormalizeContent(job, state, contentType, ...) @@ -2923,6 +2930,8 @@ local function Reconf(self) if self.power.separator then self.power.separator:Hide() end end + Border_SetSize(self, self.border, db.selBorderWidth, db.selBorderInset) + if not db.fgShowMissing then -- Blizzard's StatusBar SetFillStyle is bad, because even if it reverses direction, -- it still cuts tex coords from the usual direction @@ -3271,6 +3280,7 @@ AptechkaDefaultConfig.GridSkin = function(self) border:SetPoint("TOPLEFT", self, "TOPLEFT", -p4, p4) border:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", p4, -p4) border:SetBackdrop(border_backdrop) + Border_SetSize(self, border, db.selBorderWidth, db.selBorderInset) border:SetBackdropBorderColor(1, 1, 1, 0.5) -- new composite border