diff options
| author | ruki <[email protected]> | 2020-11-29 22:36:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-29 22:36:04 +0800 |
| commit | e4058387bfd67c02aa0e065705655b1e4b0aafbf (patch) | |
| tree | d2dfd95343e3161a9e4dc55691e37abbca69b430 /tests | |
| parent | d48118e840fc0be69f3d78a3894e4bf76b8d801b (diff) | |
support scrollbar
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/dialog.lua | 1 | ||||
| -rw-r--r-- | tests/ui/mconfdialog.lua | 23 |
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua index 459907fa3..ace1873e4 100644 --- a/tests/ui/dialog.lua +++ b/tests/ui/dialog.lua @@ -75,6 +75,7 @@ function demo:dialog_help() local dialog_help = self._DIALOG_HELP if not dialog_help then dialog_help = textdialog:new("dialog.help", rect {1, 1, self:width() - 1, self:height() - 1}, "README") + dialog_help:option_set("scrollable", true) local helptext = nil local file = io.open("./LICENSE.md", 'r') if file then diff --git a/tests/ui/mconfdialog.lua b/tests/ui/mconfdialog.lua index fd6385ffc..33d6b15dc 100644 --- a/tests/ui/mconfdialog.lua +++ b/tests/ui/mconfdialog.lua @@ -59,6 +59,27 @@ function demo:init() table.insert(configs_sub, menuconf.menu {description = "menu config sub-item", configs = configs_sub2}) table.insert(configs_sub, menuconf.choice {value = 2, values = {2, 5, 16, 87}, description = "choice config sub-item"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item1"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item2"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item3"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item4"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item5"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item6"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item7"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item8"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item9"}) + + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item10"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item11"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item12"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item13"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item14"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item15"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item16"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item17"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item18"}) + table.insert(configs_sub, menuconf.number {value = 6, default = 10, description = "number config item19"}) + local configs = {} table.insert(configs, menuconf.boolean {description = "boolean config item"}) table.insert(configs, menuconf.boolean {default = true, new = false, description = {"boolean config item2", @@ -68,7 +89,7 @@ function demo:init() table.insert(configs, menuconf.number {value = 6, default = 10, description = "number config item"}) table.insert(configs, menuconf.string {value = "x86_64", description = "string config item"}) table.insert(configs, menuconf.menu {description = "menu config item", configs = configs_sub}) - table.insert(configs, menuconf.choice {value = 3, values = {1, 5, 6, 7}, description = "choice config item"}) + table.insert(configs, menuconf.choice {value = 3, values = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, default = 2, description = "choice config item"}) -- init menu config dialog self:dialog_mconf():load(configs) |
