mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-14 05:33:59 -04:00
config: replace union in config struct with simple width/height members
This commit is contained in:
parent
0beed9fcf6
commit
adde947fc5
5 changed files with 16 additions and 46 deletions
14
config.c
14
config.c
|
|
@ -486,8 +486,8 @@ parse_section_main(const char *key, const char *value, struct config *conf,
|
|||
}
|
||||
|
||||
conf->size.type = CONF_SIZE_PX;
|
||||
conf->size.px.width = width;
|
||||
conf->size.px.height = height;
|
||||
conf->size.width = width;
|
||||
conf->size.height = height;
|
||||
}
|
||||
|
||||
else if (strcmp(key, "initial-window-size-chars") == 0) {
|
||||
|
|
@ -501,8 +501,8 @@ parse_section_main(const char *key, const char *value, struct config *conf,
|
|||
}
|
||||
|
||||
conf->size.type = CONF_SIZE_CELLS;
|
||||
conf->size.cells.width = width;
|
||||
conf->size.cells.height = height;
|
||||
conf->size.width = width;
|
||||
conf->size.height = height;
|
||||
}
|
||||
|
||||
else if (strcmp(key, "pad") == 0) {
|
||||
|
|
@ -2016,10 +2016,8 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.word_delimiters = xwcsdup(L",│`|:\"'()[]{}<>"),
|
||||
.size = {
|
||||
.type = CONF_SIZE_PX,
|
||||
.px = {
|
||||
.width = 700,
|
||||
.height = 500,
|
||||
},
|
||||
.width = 700,
|
||||
.height = 500,
|
||||
},
|
||||
.pad_x = 2,
|
||||
.pad_y = 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue