HBox: Add arrow keys navigation

Also rename enterButtonTarget to clickButtonOnEnter
This commit is contained in:
miruka
2019-09-09 07:41:48 -04:00
parent 7f89604789
commit e5893c5569
4 changed files with 39 additions and 14 deletions

View File

@@ -45,13 +45,13 @@ function isEmptyObject(obj) {
}
function numberWrapAround(num, max) {
function numberWrapAt(num, max) {
return num < 0 ? max + (num % max) : (num % max)
}
function hsluv(hue, saturation, lightness, alpha=1.0) {
hue = numberWrapAround(hue, 360)
hue = numberWrapAt(hue, 360)
let rgb = py.callSync("hsluv", [hue, saturation, lightness])
return Qt.rgba(rgb[0], rgb[1], rgb[2], alpha)
}