]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0634: GTK4: no minimum resize limit v9.2.0634
authorFoxe Chen <chen.foxe@gmail.com>
Sat, 13 Jun 2026 18:17:35 +0000 (18:17 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 13 Jun 2026 18:17:35 +0000 (18:17 +0000)
Problem:  GTK4: no minimum resize limit
Solution: Set minimum vertical size to 4 rows and horizontal size to 10
          columns (Foxe Chen).

closes: #20487

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui_gtk4_f.c
src/version.c

index 14ff85f625347b3626cb7345ca2890bf3ca9b98c..7306d78c2e4ff2d3f672340e3857cebf99e0cc02 100644 (file)
@@ -254,15 +254,20 @@ vim_form_size_allocate(
     static void
 vim_form_measure(
        GtkWidget       *widget UNUSED,
-       GtkOrientation  orientation UNUSED,
+       GtkOrientation  orientation,
        int             for_size UNUSED,
        int             *minimum,
        int             *natural,
        int             *minimum_baseline,
        int             *natural_baseline)
 {
-    *minimum = 1;
-    *natural = 1;
+    if (orientation == GTK_ORIENTATION_VERTICAL)
+       // Set minimum height of form widget to 4 rows.
+       *minimum = *natural = gui.char_height * 4;
+    else
+       // Set minimum width of form widget to 10 columns.
+       *minimum = *natural = gui.char_width * 10;
+
     *minimum_baseline = -1;
     *natural_baseline = -1;
 }
index a32296a6dedb96671af84c46c918475a31ad8527..756793446f547105dffb480e53911e32aaa87d9c 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    634,
 /**/
     633,
 /**/