[gnome-terminal] Fix gridding for small sizes



commit 724fcc269931432e7044ac16fee5934931a29f55
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Oct 8 16:34:03 2010 -0400

    Fix gridding for small sizes
    
    The patch from 336325 (762e01947e) caused gridding to work wrong
    when the number of rows/columns in the terminal got small enough
    that other window elements were larger. Now that we have a better
    fix for sizing of detached tabs (see previous commit), we can
    revert the change.
    
    The comment is made more explanatory to hopefully prevent the
    code from accidentally being removed again in the future.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631709

 src/terminal-window.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index eac169b..8fefcac 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2623,6 +2623,23 @@ terminal_window_set_size_force_grid (TerminalWindow *window,
   app = gtk_widget_get_toplevel (widget);
   g_assert (app != NULL);
 
+  /* This set_size_request hack is because the extra size above base
+   * size should only include the width of widgets to the side of the
+   * terminal and the height of widgets above and below the terminal.
+   * The minimum width of the menu, for example, shouldn't be included.
+   * GTK+ computes this extra size as:
+   *
+   *  size_request(toplevel) - size_request(geometry_widget)
+
+   * Which only works when the terminal has a size request wider than
+   * the menu and taller than scrollbar.
+   *
+   * See https://bugzilla.gnome.org/show_bug.cgi?id=68668
+   *
+   * The size request can be huge without hosing anything because we
+   * set the MIN_SIZE geometry hint.
+   */
+  gtk_widget_set_size_request (widget, 2000, 2000);
   gtk_widget_size_request (app, &toplevel_request);
   gtk_widget_size_request (widget, &widget_request);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]