mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
Cell: non-OPAQUE always sets non-default bit
This commit is contained in:
parent
bdd0917ea4
commit
40428fd05e
@ -1035,7 +1035,7 @@ channel_set_alpha(unsigned* channel, int alpha){
|
||||
return -1;
|
||||
}
|
||||
*channel = (alpha << CELL_ALPHA_SHIFT) | (*channel & ~CELL_ALPHA_MASK);
|
||||
if(alpha != CELL_ALPHA_HIGHCONTRAST){
|
||||
if(alpha != CELL_ALPHA_OPAQUE){
|
||||
*channel |= CELL_BGDEFAULT_MASK;
|
||||
}
|
||||
return 0;
|
||||
|
@ -120,7 +120,7 @@ SUBCASE("SetItalic") {
|
||||
CHECK(0 == cell_set_bg_alpha(&c, CELL_ALPHA_TRANSPARENT));
|
||||
CHECK(CELL_ALPHA_TRANSPARENT == cell_bg_alpha(&c));
|
||||
CHECK(cell_fg_default_p(&c));
|
||||
CHECK(cell_bg_default_p(&c));
|
||||
CHECK(!cell_bg_default_p(&c));
|
||||
}
|
||||
|
||||
// common teardown
|
||||
|
@ -124,7 +124,7 @@ TEST_CASE("NotcursesBase") {
|
||||
CHECK(0 > channels_set_bg_alpha(&channel, CELL_ALPHA_HIGHCONTRAST));
|
||||
CHECK(CELL_ALPHA_TRANSPARENT == channels_bg_alpha(channel));
|
||||
CHECK(channels_fg_default_p(channel));
|
||||
CHECK(channels_bg_default_p(channel));
|
||||
CHECK(!channels_bg_default_p(channel));
|
||||
}
|
||||
|
||||
SUBCASE("Stats"){
|
||||
|
Loading…
Reference in New Issue
Block a user