mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Merged tty_draw_double_box() function into tty_draw_box() one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
279375b418
commit
b0be11acd5
@ -138,37 +138,20 @@ tty_print_one_vline (gboolean single)
|
||||
}
|
||||
|
||||
void
|
||||
tty_draw_box (int y, int x, int ys, int xs)
|
||||
tty_draw_box (int y, int x, int ys, int xs, gboolean single)
|
||||
{
|
||||
tty_draw_vline (y, x, mc_tty_frm[MC_TTY_FRM_VERT], ys);
|
||||
tty_draw_vline (y, x + xs - 1, mc_tty_frm[MC_TTY_FRM_VERT], ys);
|
||||
tty_draw_hline (y, x, mc_tty_frm[MC_TTY_FRM_HORIZ], xs);
|
||||
tty_draw_hline (y + ys - 1, x, mc_tty_frm[MC_TTY_FRM_HORIZ], xs);
|
||||
tty_draw_vline (y, x, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys);
|
||||
tty_draw_vline (y, x + xs - 1, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys);
|
||||
tty_draw_hline (y, x, mc_tty_frm[single ? MC_TTY_FRM_HORIZ : MC_TTY_FRM_DHORIZ], xs);
|
||||
tty_draw_hline (y + ys - 1, x, mc_tty_frm[single ? MC_TTY_FRM_HORIZ : MC_TTY_FRM_DHORIZ], xs);
|
||||
tty_gotoyx (y, x);
|
||||
tty_print_alt_char (ACS_ULCORNER, TRUE);
|
||||
tty_print_alt_char (ACS_ULCORNER, single);
|
||||
tty_gotoyx (y + ys - 1, x);
|
||||
tty_print_alt_char (ACS_LLCORNER, TRUE);
|
||||
tty_print_alt_char (ACS_LLCORNER, single);
|
||||
tty_gotoyx (y, x + xs - 1);
|
||||
tty_print_alt_char (ACS_URCORNER, TRUE);
|
||||
tty_print_alt_char (ACS_URCORNER, single);
|
||||
tty_gotoyx (y + ys - 1, x + xs - 1);
|
||||
tty_print_alt_char (ACS_LRCORNER, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
tty_draw_double_box (int y, int x, int ys, int xs)
|
||||
{
|
||||
tty_draw_vline (y, x, mc_tty_frm[MC_TTY_FRM_DVERT], ys);
|
||||
tty_draw_vline (y, x + xs - 1, mc_tty_frm[MC_TTY_FRM_DVERT], ys);
|
||||
tty_draw_hline (y, x, mc_tty_frm[MC_TTY_FRM_DHORIZ], xs);
|
||||
tty_draw_hline (y + ys - 1, x, mc_tty_frm[MC_TTY_FRM_DHORIZ], xs);
|
||||
tty_gotoyx (y, x);
|
||||
tty_print_alt_char (ACS_ULCORNER, FALSE);
|
||||
tty_gotoyx (y + ys - 1, x);
|
||||
tty_print_alt_char (ACS_LLCORNER], FALSE);
|
||||
tty_gotoyx (y, x + xs - 1);
|
||||
tty_print_alt_char (ACS_URCORNER, FALSE);
|
||||
tty_gotoyx (y + ys - 1, x + xs - 1);
|
||||
tty_print_alt_char (ACS_LRCORNER, FALSE);
|
||||
tty_print_alt_char (ACS_LRCORNER, single);
|
||||
}
|
||||
|
||||
char *
|
||||
|
@ -75,8 +75,7 @@ extern void tty_print_one_vline (gboolean single);
|
||||
extern void tty_print_one_hline (gboolean single);
|
||||
extern void tty_draw_hline (int y, int x, int ch, int len);
|
||||
extern void tty_draw_vline (int y, int x, int ch, int len);
|
||||
extern void tty_draw_box (int y, int x, int rows, int cols);
|
||||
extern void tty_draw_double_box (int y, int x, int rows, int cols);
|
||||
extern void tty_draw_box (int y, int x, int rows, int cols, gboolean single);
|
||||
extern void tty_fill_region (int y, int x, int rows, int cols, unsigned char ch);
|
||||
|
||||
extern int mc_tty_frm[];
|
||||
|
@ -65,10 +65,7 @@ static void dlg_broadcast_msg_to (Dlg_head * h, widget_msg_t message,
|
||||
void
|
||||
draw_box (Dlg_head *h, int y, int x, int ys, int xs, gboolean single)
|
||||
{
|
||||
if (single)
|
||||
tty_draw_box (h->y + y, h->x + x, ys, xs);
|
||||
else
|
||||
tty_draw_double_box (h->y + y, h->x + x, ys, xs);
|
||||
tty_draw_box (h->y + y, h->x + x, ys, xs, single);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -341,7 +341,7 @@ mcview_display_clean (mcview_t * view)
|
||||
tty_setcolor (NORMAL_COLOR);
|
||||
widget_erase ((Widget *) view);
|
||||
if (view->dpy_frame_size != 0)
|
||||
tty_draw_double_box (view->widget.y, view->widget.x, view->widget.lines, view->widget.cols);
|
||||
tty_draw_box (view->widget.y, view->widget.x, view->widget.lines, view->widget.cols, FALSE);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user