Allow vertical positioning of all windows

This commit is contained in:
James Booth
2016-09-23 00:56:53 +01:00
parent 3983ee1d6b
commit d3cc5bd7ed
26 changed files with 929 additions and 140 deletions

View File

@@ -46,6 +46,7 @@
#include "ui/inputwin.h"
#include "ui/window_list.h"
#include "ui/window.h"
#include "ui/screen.h"
#include "xmpp/roster_list.h"
#include "xmpp/chat_session.h"
@@ -67,13 +68,8 @@ create_title_bar(void)
{
int cols = getmaxx(stdscr);
char *pos = prefs_get_string(PREF_INPUTWIN);
if (g_strcmp0(pos, "top") == 0) {
win = newwin(1, cols, 1, 0);
} else {
win = newwin(1, cols, 0, 0);
}
prefs_free_string(pos);
int row = screen_titlebar_row();
win = newwin(1, cols, row, 0);
wbkgd(win, theme_attrs(THEME_TITLE_TEXT));
title_bar_console();
title_bar_set_presence(CONTACT_OFFLINE);
@@ -109,13 +105,8 @@ title_bar_resize(void)
werase(win);
char *pos = prefs_get_string(PREF_INPUTWIN);
if (g_strcmp0(pos, "top") == 0) {
mvwin(win, 1, 0);
} else {
mvwin(win, 0, 0);
}
prefs_free_string(pos);
int row = screen_titlebar_row();
mvwin(win, row, 0);
wresize(win, 1, cols);
wbkgd(win, theme_attrs(THEME_TITLE_TEXT));