control-q instead of q for exitting apps + grid column override colors

This commit is contained in:
kepler155c@gmail.com 2019-07-02 14:11:33 -04:00
parent 1dcb6d67b7
commit 6ba458646f
8 changed files with 28 additions and 12 deletions

View File

@ -47,7 +47,7 @@ local Browser = UI.Page {
{ text = 'Pastebin put p', event = 'pastebin', flags = FILE }, { text = 'Pastebin put p', event = 'pastebin', flags = FILE },
{ text = 'Shell s', event = 'shell' }, { text = 'Shell s', event = 'shell' },
{ spacer = true }, { spacer = true },
{ text = 'Quit q', event = 'quit' }, { text = 'Quit ^q', event = 'quit' },
} }, } },
{ text = 'Edit', dropdown = { { text = 'Edit', dropdown = {
{ text = 'Cut ^x', event = 'cut' }, { text = 'Cut ^x', event = 'cut' },
@ -140,7 +140,7 @@ local Browser = UI.Page {
}, },
}, },
accelerators = { accelerators = {
q = 'quit', [ 'control-q' ] = 'quit',
c = 'cedit', c = 'cedit',
e = 'edit', e = 'edit',
s = 'shell', s = 'shell',

View File

@ -31,7 +31,7 @@ local page = UI.Page {
sortColumn = 'name', sortColumn = 'name',
}, },
accelerators = { accelerators = {
q = 'quit', [ 'control-q' ] = 'quit',
enter = 'grid_select', enter = 'grid_select',
}, },
} }
@ -47,7 +47,7 @@ local topicPage = UI.Page {
x = 2, ex = -1, y = 3, ey = -2, x = 2, ex = -1, y = 3, ey = -2,
}, },
accelerators = { accelerators = {
q = 'back', [ 'control-q' ] = 'back',
backspace = 'back', backspace = 'back',
}, },
} }

View File

@ -103,7 +103,7 @@ This only needs to be done once.
t = 'telnet', t = 'telnet',
v = 'vnc', v = 'vnc',
r = 'reboot', r = 'reboot',
q = 'quit', [ 'control-q' ] = 'quit',
c = 'clear', c = 'clear',
}, },
} }

View File

@ -23,7 +23,7 @@ local systemPage = UI.Page {
}, },
notification = UI.Notification(), notification = UI.Notification(),
accelerators = { accelerators = {
q = 'quit', [ 'control-q' ] = 'quit',
}, },
} }

View File

@ -26,7 +26,7 @@ local page = UI.Page {
autospace = true, autospace = true,
}, },
accelerators = { accelerators = {
q = 'quit', [ 'control-q' ] = 'quit',
space = 'activate', space = 'activate',
t = 'terminate', t = 'terminate',
}, },

View File

@ -19,6 +19,13 @@ local passwordIntro = [[A password is required for wireless access.
local packagesIntro = [[Setup Complete local packagesIntro = [[Setup Complete
%sOpen the package manager to add software to this computer.]] %sOpen the package manager to add software to this computer.]]
local contributorsIntro = [[Contributors%s
Anavrins: Encryption/security/custom apps
Community: Several selected applications
hugeblank: Startup screen improvements
LDDestroier: Art design + custom apps
Lemmmy: Application improvements]]
local page = UI.Page { local page = UI.Page {
wizard = UI.Wizard { wizard = UI.Wizard {
@ -95,6 +102,15 @@ local page = UI.Page {
value = string.format(packagesIntro, Ansi.white), value = string.format(packagesIntro, Ansi.white),
}, },
}, },
contributors = UI.WizardPage {
index = 5,
intro = UI.TextArea {
textColor = colors.yellow,
inactive = true,
x = 3, ex = -3, y = 2, ey = -2,
value = string.format(contributorsIntro, Ansi.white),
},
},
}, },
}, },
notification = UI.Notification { }, notification = UI.Notification { },

View File

@ -17,7 +17,7 @@ local tab = UI.Tab {
y = 2, ey = 9, x = 2, ex = '47%', y = 2, ey = 9, x = 2, ex = '47%',
columns = { columns = {
{ heading = 'Drive', key = 'name' }, { heading = 'Drive', key = 'name' },
{ heading = 'Side' ,key = 'side' } { heading = 'Side' ,key = 'side', textColor = colors.yellow }
}, },
sortColumn = 'name', sortColumn = 'name',
}, },
@ -29,7 +29,7 @@ local tab = UI.Tab {
backgroundSelectedColor = colors.black, --?? backgroundSelectedColor = colors.black, --??
columns = { columns = {
{key = 'name' }, {key = 'name' },
{key = 'value', align = 'right' }, {key = 'value', align = 'right', textColor = colors.yellow },
} }
}, },
@ -113,7 +113,7 @@ function tab:updateInfo()
local info, percent = getDriveInfo(selected and selected.name or self.drives.values[1].name) local info, percent = getDriveInfo(selected and selected.name or self.drives.values[1].name)
self.infos:setValues(info) self.infos:setValues(info)
self.progress.value = percent self.progress.value = percent
self.percentage.value = ('%#3d%%'):format(percent) self.percentage.value = ('%#3d%% used'):format(percent)
self:draw() self:draw()
end end

View File

@ -351,8 +351,8 @@ function UI.Grid:drawRow(sb, row, focused, bg, fg)
sb:write(ind .. safeValue(row[col.key] or ''), sb:write(ind .. safeValue(row[col.key] or ''),
col.cw + 1, col.cw + 1,
col.align, col.align,
bg, col.backgroundColor or bg,
fg) col.textColor or fg)
ind = ' ' ind = ' '
end end
end end