mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
fix and document window width on screen width dependency
This commit is contained in:
parent
f5e587a83b
commit
ca1ec21dc2
@ -252,9 +252,9 @@ MAIN_WINDOW_REC *mainwindow_create(int right)
|
|||||||
}
|
}
|
||||||
g_slist_free(line);
|
g_slist_free(line);
|
||||||
} else {
|
} else {
|
||||||
if (MAIN_WINDOW_TEXT_WIDTH(parent) <
|
if (MAIN_WINDOW_TEXT_WIDTH(parent) < 2 * NEW_WINDOW_WIDTH) {
|
||||||
2* NEW_WINDOW_WIDTH)
|
|
||||||
parent = find_window_with_room_right();
|
parent = find_window_with_room_right();
|
||||||
|
}
|
||||||
if (parent == NULL)
|
if (parent == NULL)
|
||||||
return NULL; /* not enough space */
|
return NULL; /* not enough space */
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "term.h"
|
#include "term.h"
|
||||||
|
|
||||||
#define WINDOW_MIN_SIZE 2
|
#define WINDOW_MIN_SIZE 2
|
||||||
#define NEW_WINDOW_WIDTH 10
|
#define NEW_WINDOW_WIDTH 20 /* must be >= MIN_SCREEN_WIDTH defined in term.c */
|
||||||
|
|
||||||
#define MAIN_WINDOW_TEXT_HEIGHT(window) \
|
#define MAIN_WINDOW_TEXT_HEIGHT(window) \
|
||||||
((window)->height-(window)->statusbar_lines)
|
((window)->height-(window)->statusbar_lines)
|
||||||
|
Loading…
Reference in New Issue
Block a user