Glyph transparency in selector backgrounds #847

This commit is contained in:
nick black 2020-08-01 16:50:27 -04:00 committed by Nick Black
parent 7e43077128
commit ce8b34da86

View File

@ -254,7 +254,7 @@ ncselector* ncselector_create(ncplane* nc, int y, int x, const ncselector_option
channels_set_fg_alpha(&transchan, CELL_ALPHA_TRANSPARENT); channels_set_fg_alpha(&transchan, CELL_ALPHA_TRANSPARENT);
channels_set_bg_alpha(&transchan, CELL_ALPHA_TRANSPARENT); channels_set_bg_alpha(&transchan, CELL_ALPHA_TRANSPARENT);
ncplane_set_base(ns->ncp, "", 0, transchan); ncplane_set_base(ns->ncp, "", 0, transchan);
if(cell_prime(ns->ncp, &ns->background, " ", 0, opts->bgchannels) < 0){ if(cell_prime(ns->ncp, &ns->background, "", 0, opts->bgchannels) < 0){
ncplane_destroy(ns->ncp); ncplane_destroy(ns->ncp);
goto freeitems; goto freeitems;
} }
@ -762,7 +762,7 @@ ncmultiselector* ncmultiselector_create(ncplane* nc, int y, int x,
channels_set_fg_alpha(&transchan, CELL_ALPHA_TRANSPARENT); channels_set_fg_alpha(&transchan, CELL_ALPHA_TRANSPARENT);
channels_set_bg_alpha(&transchan, CELL_ALPHA_TRANSPARENT); channels_set_bg_alpha(&transchan, CELL_ALPHA_TRANSPARENT);
ncplane_set_base(ns->ncp, "", 0, transchan); ncplane_set_base(ns->ncp, "", 0, transchan);
if(cell_prime(ns->ncp, &ns->background, " ", 0, opts->bgchannels) < 0){ if(cell_prime(ns->ncp, &ns->background, "", 0, opts->bgchannels) < 0){
ncplane_destroy(ns->ncp); ncplane_destroy(ns->ncp);
goto freeitems; goto freeitems;
} }