LuaRT applications will automatically change current theme if user changes the Windows theme setting.
ui.systheme readonly property
Get the current Windows color theme, as a string
value :
"dark"
: current Windows color theme is dark"light"
: current Windows color theme is light
Example
local ui = require "ui"
local win = ui.Window("ui.systheme example", 320, 200)
win:center()
local button = ui.Button(win, ui.systheme)
button:center()
function button:onClick()
ui.theme = ui.theme == "dark" and "light" or "dark"
button.text = ui.theme
end
ui.run(win):wait()