comparison Dock.lua @ 73:3745540e8996 v2.1.74

- New commands: - /dvn remove (index|tag) will remove a channel from the current profile - /dvncolors resets the tag color cache - Fixed an issue with creating more than one output channel per UI session. - Performance improvements: - Color caching now ignores decimal timestamps, removing a source of cache bloat - Cleaned up a bunch of global variable use in many areas
author Nenue
date Sat, 09 Apr 2016 06:34:04 -0400
parents 516ceb31703d
children f6fae1a4c66c
comparison
equal deleted inserted replaced
72:da5ff1fc9fb6 73:3745540e8996
45 45
46 --- Space everything and set the dock size 46 --- Space everything and set the dock size
47 function D:UpdateDock() 47 function D:UpdateDock()
48 local pad_offset = 12 48 local pad_offset = 12
49 local draw_offset = pad_offset 49 local draw_offset = pad_offset
50 for i = 1, #self.dock.buttons do 50
51 local dockn = 1
52 for i, d in pairs(self.dock.buttons) do
53 dockn = max(i, dockn)
54 end
55 for i = 1, dockn do
51 local d = self.dock.buttons[i] 56 local d = self.dock.buttons[i]
52 d:SetPoint('TOPLEFT', DevianDock, 'TOPLEFT', draw_offset, 0) 57 if d then
53 draw_offset= draw_offset + d:GetWidth() + pad_offset 58 d:SetPoint('TOPLEFT', DevianDock, 'TOPLEFT', draw_offset, 0)
59 draw_offset= draw_offset + d:GetWidth() + pad_offset
60 end
54 end 61 end
55 self.dock:SetWidth(draw_offset) 62 self.dock:SetWidth(draw_offset)
56 end 63 end
57 64
58 --- Updates region visibility as needed 65 --- Updates region visibility as needed