Skip to content

Commit b4d7012

Browse files
committed
smooth bar toggle for castbar, classbar, health, power, aurabars, and auras
1 parent 545d6f4 commit b4d7012

File tree

14 files changed

+38
-18
lines changed

14 files changed

+38
-18
lines changed

ElvUI/Core/Defaults/Profile.lua

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,10 @@ local NP_Auras = {
555555

556556
local NP_Health = {
557557
enable = true,
558-
healPrediction = true,
559558
height = 10,
559+
healPrediction = true,
560560
useClassColor = true,
561+
smoothbars = false,
561562
text = {
562563
enable = true,
563564
format = '[health:percent]',
@@ -573,6 +574,7 @@ local NP_Health = {
573574

574575
local NP_Power = {
575576
enable = false,
577+
smoothbars = false,
576578
useClassColor = false,
577579
hideWhenEmpty = false,
578580
costPrediction = true,
@@ -662,6 +664,7 @@ local NP_Castbar = {
662664
displayTarget = false,
663665
hideSpellName = false,
664666
hideTime = false,
667+
smoothbars = false,
665668
spellRename = true,
666669
sourceInterrupt = true,
667670
sourceInterruptClassColor = true,
@@ -744,7 +747,6 @@ P.nameplates = {
744747
overlapV = 1.1,
745748
showEnemyCombat = 'DISABLED',
746749
showFriendlyCombat = 'DISABLED',
747-
smoothbars = false,
748750
statusbar = 'ElvUI Norm',
749751
thinBorders = true,
750752
clickThrough = {
@@ -1097,6 +1099,7 @@ local TopAuras = {
10971099
sortMethod = 'TIME',
10981100
verticalSpacing = 16,
10991101
wrapAfter = 12,
1102+
smoothbars = false,
11001103
}
11011104

11021105
--Auras
@@ -1367,10 +1370,10 @@ local UF_DebuffHighlight = {
13671370
}
13681371

13691372
local UF_AuraBars = {
1373+
enable = true,
13701374
anchorPoint = 'ABOVE',
13711375
attachTo = 'DEBUFFS',
13721376
detachedWidth = 270,
1373-
enable = true,
13741377
enemyAuraType = 'HARMFUL',
13751378
friendlyAuraType = 'HELPFUL',
13761379
height = 20,
@@ -1385,6 +1388,7 @@ local UF_AuraBars = {
13851388
clickThrough = false,
13861389
reverseFill = false,
13871390
abbrevName = false,
1391+
smoothbars = false,
13881392
}
13891393

13901394
local UF_AuraWatch = {
@@ -1437,6 +1441,7 @@ local UF_Castbar = {
14371441
insideInfoPanel = true,
14381442
overlayOnFrame = 'None',
14391443
displayTarget = false,
1444+
smoothbars = false,
14401445
reverse = false,
14411446
spark = true,
14421447
textColor = {r = 0.84, g = 0.75, b = 0.65, a = 1},
@@ -1483,6 +1488,7 @@ local UF_Health = {
14831488
orientation = 'HORIZONTAL',
14841489
position = 'RIGHT',
14851490
reverseFill = false,
1491+
smoothbars = false,
14861492
text_format = '',
14871493
xOffset = -2,
14881494
yOffset = 0,
@@ -1589,6 +1595,7 @@ local UF_Power = {
15891595
width = 'fill',
15901596
xOffset = 2,
15911597
yOffset = 0,
1598+
smoothbars = false,
15921599
displayAltPower = false,
15931600
strataAndLevel = CopyTable(UF_StrataAndLevel),
15941601
useAtlas = false,
@@ -1716,6 +1723,7 @@ local UF_ClassBar = {
17161723
fill = 'fill',
17171724
height = 10,
17181725
autoHide = false,
1726+
smoothbars = false,
17191727
sortDirection = 'asc',
17201728
altPowerColor = { r = 0.2, g = 0.4, b = 0.8 },
17211729
altPowerTextFormat = E.Retail and '[altpower:current]' or '',
@@ -1736,7 +1744,6 @@ UF_PrivateAuras.duration.enable = false
17361744

17371745
--UnitFrame
17381746
P.unitframe = {
1739-
smoothbars = false,
17401747
statusbar = 'ElvUI Norm',
17411748
font = 'Homespun',
17421749
fontSize = 10,

ElvUI/Core/Modules/Auras/Auras.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ function A:CreateIcon(button)
182182
A:Update_CooldownOptions(button)
183183
A:UpdateIcon(button)
184184

185-
E:SetSmoothing(button.statusBar)
186-
187185
if button.filter == 'HELPFUL' and MasqueGroupBuffs and E.private.auras.masque.buffs then
188186
MasqueGroupBuffs:AddButton(button, A:MasqueData(button.texture, button.highlight))
189187
if button.__MSQ_BaseFrame then button.__MSQ_BaseFrame:SetFrameLevel(2) end --Lower the framelevel to fix issue with buttons created during combat
@@ -202,6 +200,8 @@ function A:UpdateIcon(button, update)
202200

203201
if update then
204202
button:Size(db.size)
203+
204+
E:SetSmoothing(button.statusBar, db.smoothbars)
205205
end
206206

207207
button.count:ClearAllPoints()

ElvUI/Core/Modules/Nameplates/Elements/CastBar.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,13 @@ function NP:Update_Castbar(nameplate)
220220
castbar.timeToHold = db.timeToHold
221221
castbar.castTimeFormat = db.castTimeFormat
222222
castbar.channelTimeFormat = db.channelTimeFormat
223+
castbar.pipColor = NP.db.colors.empoweredCast
223224

224225
castbar:Size(db.width, db.height)
225226
castbar:Point('CENTER', nameplate, 'CENTER', db.xOffset, db.yOffset)
226227

227-
castbar.pipColor = NP.db.colors.empoweredCast
228+
E:SetSmoothing(castbar, db.smoothbars)
229+
228230
for stage, pip in next, castbar.Pips do
229231
UF:CastBar_UpdatePip(castbar, pip, stage)
230232
end

ElvUI/Core/Modules/Nameplates/Elements/Health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function NP:Update_Health(nameplate, skipUpdate)
117117
nameplate.Health:Point('LEFT')
118118
nameplate.Health:Point('RIGHT')
119119

120-
E:SetSmoothing(nameplate.Health, NP.db.smoothbars)
120+
E:SetSmoothing(nameplate.Health, db.health.smoothbars)
121121
elseif nameplate:IsElementEnabled('Health') then
122122
nameplate:DisableElement('Health')
123123
end

ElvUI/Core/Modules/Nameplates/Elements/Power.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function NP:Update_Power(nameplate)
128128
nameplate.Power:SetStatusBarTexture(LSM:Fetch('statusbar', NP.db.statusbar))
129129
nameplate.Power:Point('CENTER', nameplate, 'CENTER', db.power.xOffset, db.power.yOffset)
130130

131-
E:SetSmoothing(nameplate.Power, NP.db.smoothbars)
131+
E:SetSmoothing(nameplate.Power, db.power.smoothbars)
132132
elseif nameplate:IsElementEnabled('Power') then
133133
nameplate:DisableElement('Power')
134134
end

ElvUI/Core/Modules/UnitFrames/Elements/AltPower.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function UF:Configure_AltPowerBar(frame)
4343
local color = db.altPowerColor
4444
frame.AlternativePower:SetStatusBarColor(color.r, color.g, color.b)
4545

46-
E:SetSmoothing(frame.AlternativePower, UF.db.smoothbars)
46+
E:SetSmoothing(frame.AlternativePower, db.smoothbars)
4747
elseif frame:IsElementEnabled('AlternativePower') then
4848
frame:DisableElement('AlternativePower')
4949
frame.AlternativePower:Hide()

ElvUI/Core/Modules/UnitFrames/Elements/AuraBars.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ function UF:AuraBars_UpdateBar(bar)
5353
bar.auraInfo = {}
5454
end
5555

56+
E:SetSmoothing(bar, bars.db.smoothbars)
57+
5658
bar:SetReverseFill(not not bars.reverseFill)
5759
bar.spark:ClearAllPoints()
5860
bar.spark:Point(bars.reverseFill and 'LEFT' or 'RIGHT', bar:GetStatusBarTexture())

ElvUI/Core/Modules/UnitFrames/Elements/CastBar.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ function UF:Configure_Castbar(frame)
185185
local SPACING1 = UF.BORDER + UF.SPACING
186186
local SPACING2 = SPACING1 * 2
187187

188+
E:SetSmoothing(castbar, db.smoothbars)
189+
188190
castbar.timeToHold = db.timeToHold
189191
castbar:SetReverseFill(db.reverse)
190192
castbar:ClearAllPoints()

ElvUI/Core/Modules/UnitFrames/Elements/ClassBars.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function UF:Configure_ClassBar(frame)
197197
bars.LunarBar:SetStatusBarColor(lr, lg, lb)
198198
bars.LunarBar:Size(CLASSBAR_WIDTH - SPACING, frame.CLASSBAR_HEIGHT - SPACING)
199199
bars.LunarBar:SetOrientation(isVertical and 'VERTICAL' or 'HORIZONTAL')
200-
E:SetSmoothing(bars.LunarBar, UF.db.smoothbars)
200+
E:SetSmoothing(bars.LunarBar, db.classbar and db.classbar.smoothbars)
201201

202202
local sr, sg, sb = unpack(ElvUF.colors.ClassBars.DRUID[2])
203203
bars.SolarBar:SetMinMaxValues(-1, 1)
@@ -206,7 +206,7 @@ function UF:Configure_ClassBar(frame)
206206
bars.SolarBar:SetOrientation(isVertical and 'VERTICAL' or 'HORIZONTAL')
207207
bars.SolarBar:ClearAllPoints()
208208
bars.SolarBar:Point(isVertical and 'BOTTOM' or 'LEFT', lunarTex, isVertical and 'TOP' or 'RIGHT')
209-
E:SetSmoothing(bars.SolarBar, UF.db.smoothbars)
209+
E:SetSmoothing(bars.SolarBar, db.classbar and db.classbar.smoothbars)
210210

211211
bars.Arrow:ClearAllPoints()
212212
bars.Arrow:Point('CENTER', lunarTex, isVertical and 'TOP' or 'RIGHT', 0, isVertical and -4 or 0)

ElvUI/Core/Modules/UnitFrames/Elements/Health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function UF:Configure_HealthBar(frame, powerUpdate)
5858

5959
health:SetColorTapping(true)
6060
health:SetColorDisconnected(true)
61-
E:SetSmoothing(health, UF.db.smoothbars)
61+
E:SetSmoothing(health, db.health and db.health.smoothbars)
6262

6363
-- Text
6464
if db.health and health.value then

0 commit comments

Comments
 (0)