Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- -- AldaranaUI
- local E = AldaranaUI and AldaranaUI[1]
- local backdropBorder = {
- bgFile = "Interface\\Buttons\\WHITE8X8",
- edgeFile = "Interface\\AddOns\\Redtuzk's Pixelborder\\Pixelborder",
- tile = false, tileSize = 0, edgeSize = .5,
- insets = {left = 0, right = 0, top = 0, bottom = 0}
- }
- local function removeStyle(bar)
- bar:SetHeight(14)
- local bd = bar.candyBarBackdrop
- bd:Hide()
- if bd.iborder then
- bd.iborder:Hide()
- bd.oborder:Hide()
- end
- local tex = bar:Get("bigwigs:restoreicon")
- if tex then
- local icon = bar.candyBarIconFrame
- icon:ClearAllPoints()
- icon:SetPoint("TOPLEFT")
- icon:SetPoint("BOTTOMLEFT")
- bar:SetIcon(tex)
- local iconBd = bar.candyBarIconFrameBackdrop
- iconBd:Hide()
- if iconBd.iborder then
- iconBd.iborder:Hide()
- iconBd.oborder:Hide()
- end
- end
- end
- local function styleBar(bar)
- bar:SetHeight(20)
- local bd = bar.candyBarBackdrop
- if E then
- bd:SetTemplate("Transparent")
- bd:SetOutside(bar)
- if not E.PixelMode and bd.iborder then
- bd.iborder:Show()
- bd.oborder:Show()
- end
- else
- bd:SetBackdrop(backdropBorder)
- bd:SetBackdropColor(0, 0, 0, 1)
- bd:SetBackdropBorderColor(0, 0, 0)
- bd:ClearAllPoints()
- bd:SetPoint("TOPLEFT", bar, "TOPLEFT", -1, 1)
- bd:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", 1, -1)
- end
- if plugin.db.profile.icon then
- local icon = bar.candyBarIconFrame
- local tex = icon.icon
- bar:SetIcon(nil)
- icon:SetTexture(tex)
- icon:ClearAllPoints()
- icon:SetPoint("BOTTOMRIGHT", bar, "BOTTOMLEFT", E and (E.PixelMode and -1 or -5) or -1, 0)
- icon:SetSize(20, 20)
- bar:Set("bigwigs:restoreicon", tex)
- local iconBd = bar.candyBarIconFrameBackdrop
- if E then
- iconBd:SetTemplate("Transparent")
- iconBd:SetOutside(bar.candyBarIconFrame)
- if not E.PixelMode and iconBd.iborder then
- iconBd.iborder:Show()
- iconBd.oborder:Show()
- end
- else
- iconBd:SetBackdrop(backdropBorder)
- iconBd:SetBackdropColor(0, 0, 0, 1)
- iconBd:SetBackdropBorderColor(0, 0, 0)
- iconBd:ClearAllPoints()
- iconBd:SetPoint("TOPLEFT", icon, "TOPLEFT", -1, 1)
- iconBd:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 1, -1)
- end
- iconBd:Show()
- end
- bd:Show()
- end
- barStyles.AldaranaUI = {
- apiVersion = 1,
- version = 2,
- GetSpacing = function() return E and (E.PixelMode and 3 or 3) or 3 end,
- ApplyStyle = styleBar,
- BarStopped = removeStyle,
- GetStyleName = function() return "AldaranaUI" end,
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement