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 = 'Shell s', event = 'shell' },
{ spacer = true },
{ text = 'Quit q', event = 'quit' },
{ text = 'Quit ^q', event = 'quit' },
} },
{ text = 'Edit', dropdown = {
{ text = 'Cut ^x', event = 'cut' },
@ -140,7 +140,7 @@ local Browser = UI.Page {
},
},
accelerators = {
q = 'quit',
[ 'control-q' ] = 'quit',
c = 'cedit',
e = 'edit',
s = 'shell',

View File

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

View File

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

View File

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

View File

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

View File

@ -19,6 +19,13 @@ local passwordIntro = [[A password is required for wireless access.
local packagesIntro = [[Setup Complete
%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 {
wizard = UI.Wizard {
@ -95,6 +102,15 @@ local page = UI.Page {
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 { },

View File

@ -17,7 +17,7 @@ local tab = UI.Tab {
y = 2, ey = 9, x = 2, ex = '47%',
columns = {
{ heading = 'Drive', key = 'name' },
{ heading = 'Side' ,key = 'side' }
{ heading = 'Side' ,key = 'side', textColor = colors.yellow }
},
sortColumn = 'name',
},
@ -29,7 +29,7 @@ local tab = UI.Tab {
backgroundSelectedColor = colors.black, --??
columns = {
{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)
self.infos:setValues(info)
self.progress.value = percent
self.percentage.value = ('%#3d%%'):format(percent)
self.percentage.value = ('%#3d%% used'):format(percent)
self:draw()
end

View File

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