mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
[dialog] _node
This commit is contained in:
parent
f2a1998d65
commit
fb0bd72743
@ -72,7 +72,7 @@ void
|
||||
redraw_dialog(struct dialog_data *dlg_data, int layout)
|
||||
{
|
||||
struct terminal *term = dlg_data->win->term;
|
||||
struct color_pair *title_color;
|
||||
unsigned int title_color_node;
|
||||
|
||||
if (layout) {
|
||||
dlg_data->dlg->layouter(dlg_data);
|
||||
@ -91,12 +91,12 @@ redraw_dialog(struct dialog_data *dlg_data, int layout)
|
||||
dlg_data->box.width - 2 * (DIALOG_LEFT_BORDER + 1),
|
||||
dlg_data->box.height - 2 * (DIALOG_TOP_BORDER + 1));
|
||||
|
||||
draw_border(term, &dlg_data->real_box, get_bfu_color(term, "dialog.frame"), DIALOG_FRAME);
|
||||
draw_border_node(term, &dlg_data->real_box, get_bfu_color_node(term, "dialog.frame"), DIALOG_FRAME);
|
||||
|
||||
assert(dlg_data->dlg->title);
|
||||
|
||||
title_color = get_bfu_color(term, "dialog.title");
|
||||
if (title_color && dlg_data->real_box.width > 2) {
|
||||
title_color_node = get_bfu_color_node(term, "dialog.title");
|
||||
if (title_color_node && dlg_data->real_box.width > 2) {
|
||||
char *title = dlg_data->dlg->title;
|
||||
int titlelen = strlen(title);
|
||||
int titlecells = titlelen;
|
||||
@ -120,10 +120,10 @@ redraw_dialog(struct dialog_data *dlg_data, int layout)
|
||||
y = dlg_data->real_box.y - 1;
|
||||
|
||||
|
||||
draw_text(term, x - 1, y, " ", 1, 0, title_color);
|
||||
draw_text(term, x, y, title, titlelen, 0, title_color);
|
||||
draw_text(term, x + titlecells, y, " ", 1, 0,
|
||||
title_color);
|
||||
draw_text_node(term, x - 1, y, " ", 1, 0, title_color_node);
|
||||
draw_text_node(term, x, y, title, titlelen, 0, title_color_node);
|
||||
draw_text_node(term, x + titlecells, y, " ", 1, 0,
|
||||
title_color_node);
|
||||
}
|
||||
}
|
||||
|
||||
@ -686,13 +686,13 @@ draw_dialog(struct dialog_data *dlg_data, int width, int height)
|
||||
(term->width - dlg_width) / 2, (term->height - dlg_height) / 2,
|
||||
dlg_width, dlg_height);
|
||||
|
||||
draw_box(term, &dlg_data->box, ' ', 0,
|
||||
get_bfu_color(term, "dialog.generic"));
|
||||
draw_box_node(term, &dlg_data->box, ' ', 0,
|
||||
get_bfu_color_node(term, "dialog.generic"));
|
||||
|
||||
if (get_opt_bool("ui.dialogs.shadows", NULL)) {
|
||||
/* Draw shadow */
|
||||
draw_shadow(term, &dlg_data->box,
|
||||
get_bfu_color(term, "dialog.shadow"), 2, 1);
|
||||
draw_shadow_node(term, &dlg_data->box,
|
||||
get_bfu_color_node(term, "dialog.shadow"), 2, 1);
|
||||
#ifdef CONFIG_UTF8
|
||||
if (term->utf8_cp)
|
||||
fix_dwchar_around_box(term, &dlg_data->box, 0, 2, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user