mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:03:13 +02:00
core: add option weechat.look.chat_space_right (issue #1862)
This commit is contained in:
@@ -101,6 +101,7 @@ struct t_config_option *config_look_buffer_search_regex;
|
||||
struct t_config_option *config_look_buffer_search_where;
|
||||
struct t_config_option *config_look_buffer_time_format;
|
||||
struct t_config_option *config_look_buffer_time_same;
|
||||
struct t_config_option *config_look_chat_space_right;
|
||||
struct t_config_option *config_look_color_basic_force_bold;
|
||||
struct t_config_option *config_look_color_inactive_buffer;
|
||||
struct t_config_option *config_look_color_inactive_message;
|
||||
@@ -2885,6 +2886,13 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL,
|
||||
&config_change_buffer_time_same, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_chat_space_right = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"chat_space_right", "boolean",
|
||||
N_("keep a space on the right side of chat area if there is a bar "
|
||||
"displayed on the right (for both text and read marker)"),
|
||||
NULL, 0, 0, "off", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_color_basic_force_bold = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"color_basic_force_bold", "boolean",
|
||||
|
||||
@@ -153,6 +153,7 @@ extern struct t_config_option *config_look_buffer_search_regex;
|
||||
extern struct t_config_option *config_look_buffer_search_where;
|
||||
extern struct t_config_option *config_look_buffer_time_format;
|
||||
extern struct t_config_option *config_look_buffer_time_same;
|
||||
extern struct t_config_option *config_look_chat_space_right;
|
||||
extern struct t_config_option *config_look_color_basic_force_bold;
|
||||
extern struct t_config_option *config_look_color_inactive_buffer;
|
||||
extern struct t_config_option *config_look_color_inactive_message;
|
||||
|
||||
@@ -56,11 +56,16 @@
|
||||
int
|
||||
gui_chat_get_real_width (struct t_gui_window *window)
|
||||
{
|
||||
if ((window->win_chat_width > 1)
|
||||
if (CONFIG_BOOLEAN(config_look_chat_space_right)
|
||||
&& (window->win_chat_width > 1)
|
||||
&& (window->win_chat_x + window->win_chat_width < gui_window_get_width ()))
|
||||
{
|
||||
return window->win_chat_width - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return window->win_chat_width;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user