mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[color] Draw background
This commit is contained in:
parent
f7c44b52fc
commit
7135d6db08
@ -324,12 +324,22 @@ draw_doc(struct session *ses, struct document_view *doc_view, int active)
|
||||
|
||||
vs = doc_view->vs;
|
||||
if (!vs) {
|
||||
draw_box(term, box, ' ', 0, &color);
|
||||
int bgchar = get_opt_int("ui.background_char", ses);
|
||||
#ifdef CONFIG_UTF8
|
||||
draw_box(term, box, bgchar, 0, get_bfu_color(term, "desktop"));
|
||||
#else
|
||||
draw_box(term, box, (unsigned char)bgchar, 0, get_bfu_color(term, "desktop"));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (document_has_frames(doc_view->document)) {
|
||||
draw_box(term, box, ' ', 0, &color);
|
||||
int bgchar = get_opt_int("ui.background_char", ses);
|
||||
#ifdef CONFIG_UTF8
|
||||
draw_box(term, box, bgchar, 0, get_bfu_color(term, "desktop"));
|
||||
#else
|
||||
draw_box(term, box, (unsigned char)bgchar, 0, get_bfu_color(term, "desktop"));
|
||||
#endif
|
||||
draw_frame_lines(term, doc_view->document->frame_desc, box->x, box->y, &color);
|
||||
if (vs->current_link == -1)
|
||||
vs->current_link = 0;
|
||||
@ -380,7 +390,13 @@ draw_doc(struct session *ses, struct document_view *doc_view, int active)
|
||||
}
|
||||
doc_view->last_x = vx;
|
||||
doc_view->last_y = vy;
|
||||
draw_box(term, box, ' ', 0, &color);
|
||||
|
||||
int bgchar = get_opt_int("ui.background_char", ses);
|
||||
#ifdef CONFIG_UTF8
|
||||
draw_box(term, box, bgchar, 0, get_bfu_color(term, "desktop"));
|
||||
#else
|
||||
draw_box(term, box, (unsigned char)bgchar, 0, get_bfu_color(term, "desktop"));
|
||||
#endif
|
||||
if (!doc_view->document->height) return;
|
||||
|
||||
while (vs->y >= doc_view->document->height) vs->y -= box->height;
|
||||
@ -481,11 +497,16 @@ draw_formatted(struct session *ses, int rerender)
|
||||
if (!ses->doc_view || !ses->doc_view->document) {
|
||||
/*INTERNAL("document not formatted");*/
|
||||
struct el_box box;
|
||||
int bgchar = get_opt_int("ui.background_char", ses);
|
||||
|
||||
set_box(&box, 0, 1,
|
||||
ses->tab->term->width,
|
||||
ses->tab->term->height - 2);
|
||||
draw_box(ses->tab->term, &box, ' ', 0, NULL);
|
||||
#ifdef CONFIG_UTF8
|
||||
draw_box(ses->tab->term, &box, bgchar, 0, get_bfu_color(ses->tab->term, "desktop"));
|
||||
#else
|
||||
draw_box(ses->tab->term, &box, (unsigned char)bgchar, 0, get_bfu_color(ses->tab->term, "desktop"));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user