mirror of
https://github.com/kepler155c/opus
synced 2025-11-18 00:05:12 +00:00
spaces->tabs + cleanup + pathing fixes
This commit is contained in:
@@ -329,23 +329,13 @@ function UI.Grid:drawRows()
|
||||
local rawRow = self.values[key]
|
||||
local row = self:getDisplayValues(rawRow, key)
|
||||
|
||||
local ind = ' '
|
||||
if self.focused and index == self.index and not self.inactive then
|
||||
ind = self.focusIndicator
|
||||
end
|
||||
|
||||
local selected = index == self.index and not self.inactive
|
||||
local bg = self:getRowBackgroundColor(rawRow, selected)
|
||||
local fg = self:getRowTextColor(rawRow, selected)
|
||||
local focused = self.focused and selected
|
||||
|
||||
self:drawRow(sb, row, focused, bg, fg)
|
||||
|
||||
for _,col in pairs(self.columns) do
|
||||
sb:write(ind .. safeValue(row[col.key] or ''),
|
||||
col.cw + 1,
|
||||
col.align,
|
||||
bg,
|
||||
fg)
|
||||
ind = ' '
|
||||
end
|
||||
sb:finish(bg)
|
||||
end
|
||||
|
||||
@@ -354,6 +344,19 @@ function UI.Grid:drawRows()
|
||||
end
|
||||
end
|
||||
|
||||
function UI.Grid:drawRow(sb, row, focused, bg, fg)
|
||||
local ind = focused and self.focusIndicator or ' '
|
||||
|
||||
for _,col in pairs(self.columns) do
|
||||
sb:write(ind .. safeValue(row[col.key] or ''),
|
||||
col.cw + 1,
|
||||
col.align,
|
||||
bg,
|
||||
fg)
|
||||
ind = ' '
|
||||
end
|
||||
end
|
||||
|
||||
function UI.Grid:getRowTextColor(row, selected)
|
||||
if selected then
|
||||
if self.focused then
|
||||
|
||||
Reference in New Issue
Block a user