diff options
author | Frederic Culot <calcurse@culot.org> | 2008-04-19 09:22:14 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2008-04-19 09:22:14 +0000 |
commit | 2e798df3cb498b0e2150a5c2ace47eb80281237e (patch) | |
tree | b4a6216f1f42808f131cab1a13e485fcd8224bf0 /src/wins.c | |
parent | f0d44091519e26b160ce12bc7366d02f196ac852 (diff) | |
download | calcurse-2e798df3cb498b0e2150a5c2ace47eb80281237e.zip |
Scrollbar added in general configuration menu
Diffstat (limited to 'src/wins.c')
-rwxr-xr-x | src/wins.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: wins.c,v 1.14 2008/04/18 17:53:31 culot Exp $ */ +/* $calcurse: wins.c,v 1.15 2008/04/19 09:22:14 culot Exp $ */ /* * Calcurse - text-based organizer @@ -145,7 +145,7 @@ wins_scrollwin_delete (scrollwin_t *sw) void wins_scrollwin_display (scrollwin_t *sw) { - const int visible_lines = sw->win.h - sw->pad.x; + const int visible_lines = sw->win.h - sw->pad.y - 1; if (sw->total_lines > visible_lines) { @@ -166,6 +166,21 @@ wins_scrollwin_display (scrollwin_t *sw) doupdate (); } +void +wins_scrollwin_up (scrollwin_t *sw) +{ + if (sw->first_visible_line > 0) + sw->first_visible_line--; +} + +void +wins_scrollwin_down (scrollwin_t *sw) +{ + if (sw->total_lines + > (sw->first_visible_line + sw->win.h - sw->pad.y - 1)) + sw->first_visible_line++; +} + /* * Delete the existing windows and recreate them with their new * size and placement. |