Scrollbar added in general configuration menu

This commit is contained in:
Frederic Culot
2008-04-19 09:22:14 +00:00
parent f0d4409151
commit 2e798df3cb
5 changed files with 121 additions and 86 deletions

View File

@@ -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.