Add macro text width option (#35)

* add font width

* add font width

* set fontWidth
This commit is contained in:
Anthony Narkevicius
2023-03-09 14:28:13 -08:00
committed by GitHub
parent 2e7bff63e9
commit 9f523534b8
3 changed files with 12 additions and 3 deletions
+2 -1
View File
@@ -539,6 +539,7 @@ function AB:StyleButton(button, noBackdrop, useMasque)
if macroText then
macroText:ClearAllPoints()
macroText:SetWidth(self.db.fontWidth)
macroText:Point("BOTTOM", 0, 1)
macroText:FontTemplate(LSM:Fetch("font", self.db.font), self.db.fontSize, self.db.fontOutline)
macroText:SetTextColor(color.r, color.g, color.b)
@@ -994,4 +995,4 @@ local function InitializeCallback()
AB:Initialize()
end
E:RegisterModule(AB:GetName(), InitializeCallback)
E:RegisterModule(AB:GetName(), InitializeCallback)
+1
View File
@@ -4117,6 +4117,7 @@ P.actionbar = {
font = "Homespun",
fontSize = 10,
fontOutline = "MONOCHROMEOUTLINE",
fontWidth = 40,
fontColor = {r = 1, g = 1, b = 1},
macrotext = false,
+9 -2
View File
@@ -244,8 +244,15 @@ local function BuildABConfig()
desc = L["Set the font outline."],
values = C.Values.FontFlags
},
fontColor = {
fontWidth = {
order = 4,
type = "range",
name = "Font Width",
min = 5, max = 150, step = 1,
softMax = 60, softMin = 15
},
fontColor = {
order = 5,
type = "color",
name = L["COLOR"],
width = "full",
@@ -261,7 +268,7 @@ local function BuildABConfig()
end
},
textPosition = {
order = 5,
order = 6,
type = "group",
name = L["Text Position"],
guiInline = true,