floats: z-index

This commit is contained in:
Björn Linse
2021-05-01 13:29:34 +02:00
parent 7d82ea0102
commit edb5864a29
11 changed files with 148 additions and 36 deletions

View File

@@ -1909,7 +1909,7 @@ bool parse_float_config(Dictionary config, FloatConfig *fconfig, bool reconf,
} else if (strequal(key, "height")) {
has_height = true;
if (val.type == kObjectTypeInteger && val.data.integer > 0) {
fconfig->height= (int)val.data.integer;
fconfig->height = (int)val.data.integer;
} else {
api_set_error(err, kErrorTypeValidation,
"'height' key must be a positive Integer");
@@ -1983,6 +1983,14 @@ bool parse_float_config(Dictionary config, FloatConfig *fconfig, bool reconf,
"'focusable' key must be Boolean");
return false;
}
} else if (strequal(key, "zindex")) {
if (val.type == kObjectTypeInteger && val.data.integer > 0) {
fconfig->zindex = (int)val.data.integer;
} else {
api_set_error(err, kErrorTypeValidation,
"'zindex' key must be a positive Integer");
return false;
}
} else if (!strcmp(key, "border")) {
parse_border_style(val, fconfig, err);
if (ERROR_SET(err)) {