widecolor-demo: fix up right bar of handle

pull/96/head
nick black 5 years ago
parent 78e1a06661
commit 19e1b3ac94
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -27,10 +27,10 @@ message(struct ncplane* n, int maxy, int maxx, int num, int total){
cell_load(n, &ll, "");
ncplane_cursor_move_yx(n, 3, 4);
ncplane_putc(n, &ll);
ncplane_cursor_move_yx(n, 3, 18);
ncplane_cursor_move_yx(n, 3, 20);
ncplane_putc(n, &ll);
cell_load(n, &vl, "");
ncplane_cursor_move_yx(n, 2, 18);
ncplane_cursor_move_yx(n, 2, 20);
ncplane_putc(n, &vl);
ncplane_cursor_move_yx(n, 2, 4);
ncplane_putc(n, &vl);
@ -38,11 +38,11 @@ message(struct ncplane* n, int maxy, int maxx, int num, int total){
ncplane_cursor_move_yx(n, 1, 4);
ncplane_putc(n, &ul);
cell_load(n, &hl, "");
ncplane_hline(n, &hl, 13);
ncplane_hline(n, &hl, 15);
cell_load(n, &ur, "");
ncplane_putc(n, &ur);
ncplane_cursor_move_yx(n, 2, 5);
ncplane_printf(n, " %dx%d (%d/%d) ", maxx, maxy, num + 1, total);
ncplane_printf(n, " %03dx%03d (%d/%d) ", maxx, maxy, num + 1, total);
ncplane_cursor_move_yx(n, 4, 2);
ncplane_styles_off(n, CELL_STYLE_BOLD);
ncplane_fg_rgb8(n, 200, 20, 200);

@ -1041,7 +1041,7 @@ blocking_write(int fd, const char* buf, size_t buflen){
// determine the best palette for the current frame, and write the necessary
// escape sequences to 'out'.
static int
prep_optimized_palette(notcurses* nc, FILE* out){
prep_optimized_palette(notcurses* nc, FILE* out __attribute__ ((unused))){
if(nc->RGBflag){
return 0; // DirectColor, no need to write palette
}
@ -1109,24 +1109,24 @@ int notcurses_render(notcurses* nc){
// we can elide the foreground set iff the previous used fg and matched
if(!cell_fg_default_p(c)){
cell_get_fg(c, &r, &g, &b);
if(!fgelidable || lastr != r || lastg != g || lastb != b){
if(fgelidable && lastr == r && lastg == g && lastb == b){
++fgelisions;
}else{
term_fg_rgb8(nc, out, r, g, b);
++fgemissions;
fgelidable = true;
}else{
++fgelisions;
}
lastr = r; lastg = g; lastb = b;
defaultelidable = false;
}
if(!cell_bg_default_p(c)){
cell_get_bg(c, &br, &bg, &bb);
if(!bgelidable || lastbr != br || lastbg != bg || lastbb != bb){
if(bgelidable && lastbr == br && lastbg == bg && lastbb == bb){
++bgelisions;
}else{
term_bg_rgb8(nc, out, br, bg, bb);
++bgemissions;
bgelidable = true;
}else{
++bgelisions;
}
lastbr = br; lastbg = bg; lastbb = bb;
defaultelidable = false;

Loading…
Cancel
Save