forked from aniani/vim
updated for version 7.3.279
Problem: With GTK, when gvim is full-screen and a tab is opened and using a specific monitor configuration the window is too big. Solution: Adjust the window size like on MS-Windows. (Yukihiro Nakadaira)
This commit is contained in:
@@ -3899,6 +3899,21 @@ gui_mch_unmaximize()
|
||||
gtk_window_unmaximize(GTK_WINDOW(gui.mainwin));
|
||||
}
|
||||
|
||||
/*
|
||||
* Called when the font changed while the window is maximized. Compute the
|
||||
* new Rows and Columns. This is like resizing the window.
|
||||
*/
|
||||
void
|
||||
gui_mch_newfont()
|
||||
{
|
||||
int w, h;
|
||||
|
||||
gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
|
||||
w -= get_menu_tool_width();
|
||||
h -= get_menu_tool_height();
|
||||
gui_resize_shell(w, h);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the windows size.
|
||||
*/
|
||||
@@ -4409,14 +4424,9 @@ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
|
||||
|
||||
if (gui_mch_maximized())
|
||||
{
|
||||
int w, h;
|
||||
|
||||
/* Update lines and columns in accordance with the new font, keep the
|
||||
* window maximized. */
|
||||
gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
|
||||
w -= get_menu_tool_width();
|
||||
h -= get_menu_tool_height();
|
||||
gui_resize_shell(w, h);
|
||||
gui_mch_newfont();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user