Skip to content

Commit 83bd157

Browse files
committed
Few Extra Bars Cleanup
1 parent 59a8a96 commit 83bd157

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

Indicators/AbsorbBar.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@ local function Reset(self) -- luacheck: ignore 432
2626
local profile = PlexusFrame.db.profile
2727
local texture = LibSharedMedia:Fetch("statusbar", PlexusFrame.db.profile.texture) or "Interface\\Addons\\Plexus\\gradient32x32"
2828
local frame = self.__owner
29-
local side = profile.ExtraBarSide
3029
local healthBar = frame.indicators.bar
31-
local barWidth = profile.ExtraBarSize
3230
local offset = PlexusFrame.db.profile.ExtraBarBorderSize + 1
31+
local side = profile.ExtraBarSide
32+
local enableExtraBar = profile.enableExtraBar
33+
local extraBarSizeModW = side == "Left" or side == "Right" and enableExtraBar and profile.ExtraBarSize * 100 or 0
34+
local extraBarSizeModH = side == "Top" or side == "Bottom" and enableExtraBar and profile.ExtraBarSize * 100 or 0
3335

3436
self:SetParent(healthBar)
3537
self:ClearAllPoints()
36-
self:SetPoint("TOP", frame, "TOP", offset, -offset)
37-
self:SetWidth(frame:GetWidth()-5)
38-
self:SetHeight(frame:GetHeight()-5)
38+
self:SetPoint("TOP", frame, "TOP", -2, -offset)
39+
self:SetWidth(frame:GetWidth()-extraBarSizeModW)
40+
self:SetHeight(frame:GetHeight()-extraBarSizeModH)
3941
self:SetOrientation(profile.orientation)
4042
self:SetReverseFill(true)
4143
--if side == "Right" then
@@ -138,7 +140,7 @@ local function SetStatus(self, color, _, value, maxValue, _, _, _, start, durati
138140
elseif not profile.enableExtraBar and self:IsShown() then
139141
self:Hide()
140142
end
141-
self:SetAlpha(value)
143+
--self:SetAlpha(value)
142144
self.bg:Hide()
143145
end
144146

Indicators/IncomingHealingBar.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ local function Reset(self) -- luacheck: ignore 432
2828
local frame = self.__owner
2929
local healthBar = frame.indicators.bar
3030
local offset = PlexusFrame.db.profile.ExtraBarBorderSize + 1
31+
local side = profile.ExtraBarSide
32+
local enableExtraBar = profile.enableExtraBar
33+
local extraBarSizeModW = side == "Left" or side == "Right" and enableExtraBar and profile.ExtraBarSize * 100 or 0
34+
local extraBarSizeModH = side == "Top" or side == "Bottom" and enableExtraBar and profile.ExtraBarSize * 100 or 0
3135

3236
self:SetParent(healthBar)
3337
self:ClearAllPoints()
34-
self:SetPoint("TOP", frame, "TOP", offset, -offset)
35-
self:SetWidth(frame:GetWidth()-5)
36-
self:SetHeight(frame:GetHeight()-5)
38+
self:SetPoint("TOP", frame, "TOP", -2, -offset)
39+
self:SetWidth(frame:GetWidth()-extraBarSizeModW)
40+
self:SetHeight(frame:GetHeight()-extraBarSizeModH)
3741
self:SetOrientation(profile.orientation)
3842
self:SetReverseFill(true)
3943
--if side == "Right" then
@@ -136,7 +140,7 @@ local function SetStatus(self, color, _, value, maxValue, _, _, _, start, durati
136140
elseif not profile.enableExtraBar and self:IsShown() then
137141
self:Hide()
138142
end
139-
self:SetAlpha(value)
143+
--self:SetAlpha(value)
140144
self.bg:Hide()
141145
end
142146

0 commit comments

Comments
 (0)