summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-11-15 17:32:05 +0000
committerache <ache@FreeBSD.org>1994-11-15 17:32:05 +0000
commit3affdfe7d7730ae3503731962f0f02d2c9769d22 (patch)
tree9cd0706a0ff6ce3d6132b259234f81040aa812c2 /gnu
parent558b1f4747cc40fa901019d18c0097bf6540fdf3 (diff)
downloadFreeBSD-src-3affdfe7d7730ae3503731962f0f02d2c9769d22.zip
FreeBSD-src-3affdfe7d7730ae3503731962f0f02d2c9769d22.tar.gz
Make shadow more 'real': now shadowed letters appearse as dim ones.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libdialog/kernel.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gnu/lib/libdialog/kernel.c b/gnu/lib/libdialog/kernel.c
index 2cb7c8f..4e30c51 100644
--- a/gnu/lib/libdialog/kernel.c
+++ b/gnu/lib/libdialog/kernel.c
@@ -375,33 +375,30 @@ void draw_box(WINDOW *win, int y, int x, int height, int width, chtype box, chty
*/
void draw_shadow(WINDOW *win, int y, int x, int height, int width)
{
- int i;
+ int i,sx,sy;
if (has_colors()) { /* Whether terminal supports color? */
-
- /* small touchwin */
- wattrset(win, A_NORMAL);
+ getbegyx(win,sy,sx);
+ /* small touch */
+ wattrset(win, A_INVIS);
wmove(win, y + height, x + 2);
for (i = 0; i < width; i++)
- waddch(win, winch(win) & A_CHARTEXT);
-
+ waddch(win, ' ');
+ /* end touch */
wattrset(win, shadow_attr);
wmove(win, y + height, x + 2);
for (i = 0; i < width; i++)
- waddch(win, winch(win) & A_CHARTEXT);
-
+ waddch(win, mvwinch(curscr, sy+y+height, sx+x+2+i) & A_CHARTEXT);
for (i = y + 1; i < y + height + 1; i++) {
-
- /* small touchwin */
- wattrset(win, A_NORMAL);
+ /* small touch */
+ wattrset(win, A_INVIS);
wmove(win, i, x + width);
- waddch(win, winch(win) & A_CHARTEXT);
- waddch(win, winch(win) & A_CHARTEXT);
-
+ waddstr(win, " ");
+ /* end touch */
wattrset(win, shadow_attr);
wmove(win, i, x + width);
- waddch(win, winch(win) & A_CHARTEXT);
- waddch(win, winch(win) & A_CHARTEXT);
+ waddch(win, mvwinch(curscr, sy+i, sx+x+width) & A_CHARTEXT);
+ waddch(win, mvwinch(curscr, sy+i, sx+x+width+1) & A_CHARTEXT);
}
wnoutrefresh(win);
}
OpenPOWER on IntegriCloud