diff src/glyphs-widget.c @ 1068:9d75b4fe084c

[xemacs-hg @ 2002-10-24 14:19:25 by youngs] 2002-10-24 Andy Piper <andy@xemacs.org> * glyphs-widget.c (layout_query_geometry): add in fiddle factor. Include border text in width layout calculation. (layout_layout): use BORDER_FIDDLE_FACTOR instead of 10.
author youngs
date Thu, 24 Oct 2002 14:19:36 +0000
parents 332649c64dbc
children b531bf8658e9
line wrap: on
line diff
--- a/src/glyphs-widget.c	Thu Oct 24 13:55:49 2002 +0000
+++ b/src/glyphs-widget.c	Thu Oct 24 14:19:36 2002 +0000
@@ -68,6 +68,7 @@
 static void widget_query_string_geometry (Lisp_Object string, Lisp_Object face,
 					  int *width, int *height, Lisp_Object domain);
 
+#define BORDER_FIDDLE_FACTOR 10
 #ifdef DEBUG_WIDGETS
 int debug_widget_instances;
 #endif
@@ -1334,6 +1335,9 @@
       glyph_query_geometry (XCAR (items), &gwidth, &gheight, disp,
 			    image_instance);
       ph_adjust = gheight;
+      /* Include text width in vertical layouts. */
+      if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_VERTICAL)
+	maxpw = gwidth + BORDER_FIDDLE_FACTOR;
       items = XCDR (items);
     }
 
@@ -1448,7 +1452,7 @@
       IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (gheight / 2);
 
       /* #### Really, what should this be? */
-      glyph_do_layout (border, gwidth, gheight, 10, 0,
+      glyph_do_layout (border, gwidth, gheight, BORDER_FIDDLE_FACTOR, 0,
 		       image_instance);
     }