mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 04:46:21 +00:00
Resize current pad
This commit is contained in:
15
windows.c
15
windows.c
@@ -57,6 +57,7 @@ static void _cons_show_incoming_message(const char * const short_from,
|
||||
const int win_index);
|
||||
static void _win_handle_switch(const int * const ch);
|
||||
static void _win_handle_page(const int * const ch);
|
||||
static void _win_resize_all(void);
|
||||
|
||||
void gui_init(void)
|
||||
{
|
||||
@@ -110,7 +111,7 @@ void gui_resize(const int ch, const char * const input, const int size)
|
||||
{
|
||||
title_bar_resize();
|
||||
status_bar_resize();
|
||||
_current_window_refresh();
|
||||
_win_resize_all();
|
||||
inp_win_resize(input, size);
|
||||
dirty = TRUE;
|
||||
}
|
||||
@@ -474,7 +475,7 @@ static void _win_show_message(WINDOW *win, const char * const message)
|
||||
wattron(win, A_BOLD);
|
||||
}
|
||||
|
||||
static void _current_window_refresh()
|
||||
static void _current_window_refresh(void)
|
||||
{
|
||||
int rows, cols;
|
||||
getmaxyx(stdscr, rows, cols);
|
||||
@@ -483,6 +484,16 @@ static void _current_window_refresh()
|
||||
prefresh(current, _wins[_curr_prof_win].y_pos, 0, 1, 0, rows-3, cols-1);
|
||||
}
|
||||
|
||||
void _win_resize_all(void)
|
||||
{
|
||||
int rows, cols;
|
||||
getmaxyx(stdscr, rows, cols);
|
||||
|
||||
WINDOW *current = _wins[_curr_prof_win].win;
|
||||
wresize(current, PAD_SIZE, cols);
|
||||
prefresh(current, _wins[_curr_prof_win].y_pos, 0, 1, 0, rows-3, cols-1);
|
||||
}
|
||||
|
||||
static void _show_status_string(WINDOW *win, const char * const from,
|
||||
const char * const show, const char * const status, const char * const pre,
|
||||
const char * const default_show)
|
||||
|
||||
Reference in New Issue
Block a user