EventHorizon

EventHorizon

185k Downloads

Visual options - remove just the frame border.

Cluuey opened this issue ยท 3 comments

commented

I've been trying to remove the border from my frame to try and get it to fit in with my UI better.
Things I tried:
config.border = false but that does nothing, I think it just defaults to the one in EventHorizon.lua which seems hard coded, for want of a better/correct phrase.
I got a solid white border by setting it to the same as the background with:
config.border = 'Interface\\ChatFrame\\ChatFrameBackground'
Setting the padding to zero doesn't work either.

config.edgesize = 8
config.inset = {top = 2, bottom = 2, left = 2, right = 2}

Changing config.edgesize = 4 and setting config.edgesize to 1 for all of them is close to not having one.

I can turn the background off completely with config.backdrop = false but it looks a bit funny without it, I suspect I could get used to it though.
I might be able to turn the background off and then set the bar backgrounds individually with the config.barbg option but the server went down before I could try and I thought I should post this while I remembered what I'd tried.

To disable just the border I had to edit the main file, this is the section I edited. I've just commented out parts of it.

  local c = self.config.backdrop
  if c then
    if not(self.styleframe) then self.styleframe = CreateFrame('Frame',nil,mainframe) end
  else
    if self.styleframe then self.styleframe:Hide() end
    return
  end
  
  local styleframe = self.styleframe
  local stylebg = self.config.bg or 'Interface\\ChatFrame\\ChatFrameBackground'
--  local styleborder = self.config.border or 'Interface\\Tooltips\\UI-Tooltip-Border'
  local stylebgcolor = self.colors.bgcolor or {0,0,0,0.6}
--  local stylebordercolor = self.colors.bordercolor or {1,1,1,1}
--  local styleinset = self.config.inset or {top = 2, bottom = 2, left = 2, right = 2}
--  local stylepadding = self.config.padding or 3
--  local styleedge = self.config.edgesize or 8

  styleframe:SetFrameStrata('BACKGROUND')
  styleframe:SetPoint('TOPRIGHT', mainframe, 'TOPRIGHT')--, stylepadding, stylepadding)
  styleframe:SetPoint('BOTTOMLEFT', mainframe, 'BOTTOMLEFT')--, -stylepadding, -stylepadding)
  styleframe:SetBackdrop({
    bgFile = stylebg,
--    edgeFile = styleborder, tileSize = 0, edgeSize = styleedge,
--    insets = styleinset,
  })
  styleframe:SetBackdropColor(unpack(stylebgcolor))
--  styleframe:SetBackdropBorderColor(unpack(stylebordercolor))
end```
commented

While you're looking I'll tag this again.
If that ability could be moved to an option I'd be very grateful, although if it's only me who wants it I'll just hack my copy up. ;-)

commented

Setting alpha to 0 has a nice effect of making things transparent. Try it yourself and post results:

c.bordercolor = {1, 1, 1, 0} -- Color of the frame's border. Default = {1,1,1,1} (white, fully opaque)

commented

This works well enough that it's probably not worth spending time modifying the code.
Something I'd like control over in the rewrite though. ;-)