mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
render: refactor to allow setting only selection bg or fg
Before this, we only applied custom selection colors, if *both* the selection bg and fg had been set. Since the options are already split up into two separate options, and since it makes sense to at least be able to keep the foreground colors unchanged (i.e. only setting the selection background), let's allow only having one of the selection colors set. Closes #1846
This commit is contained in:
parent
c037836bbd
commit
073b637d45
8 changed files with 68 additions and 60 deletions
5
config.c
5
config.c
|
|
@ -3403,7 +3403,6 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.cursor = 0,
|
||||
},
|
||||
.use_custom = {
|
||||
.selection = false,
|
||||
.jump_label = false,
|
||||
.scrollback_indicator = false,
|
||||
.url = false,
|
||||
|
|
@ -3593,10 +3592,6 @@ config_load(struct config *conf, const char *conf_path,
|
|||
if (!config_override_apply(conf, overrides, errors_are_fatal))
|
||||
ret = !errors_are_fatal;
|
||||
|
||||
conf->colors.use_custom.selection =
|
||||
conf->colors.selection_fg >> 24 == 0 &&
|
||||
conf->colors.selection_bg >> 24 == 0;
|
||||
|
||||
if (ret && conf->fonts[0].count == 0) {
|
||||
struct config_font font;
|
||||
if (!config_font_parse("monospace", &font)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue