# HG changeset patch # User Gerd Moellmann # Date 979312860 0 # Node ID 80050ac10dbf3e220f13d1401d9d34b23b892265 # Parent a959d4b99e4d1470739123d230aacc2352e1a6d2 *** empty log message *** diff -r a959d4b99e4d -r 80050ac10dbf etc/NEWS --- a/etc/NEWS Fri Jan 12 15:12:10 2001 +0000 +++ b/etc/NEWS Fri Jan 12 15:21:00 2001 +0000 @@ -3642,8 +3642,9 @@ `:margin MARGIN' -MARGIN must be a number >= 0 specifying how many pixels to put as -margin around the image. Default is 0. +MARGIN must be either a number >= 0 specifying how many pixels to put +as margin around the image, or a pair (X . Y) with X specifying the +horizontal margin and Y specifying the vertical margin. Default is 0. `:relief RELIEF' @@ -4074,7 +4075,8 @@ You can add extra space between tool bar items by setting `tool-bar-button-margin' to a positive integer specifying a number of -pixels. Default is 1. +pixels, or a pair of integers (X . Y) specifying horizontal and +vertical margins . Default is 1. You can change the shadow thickness of tool bar buttons by setting `tool-bar-button-relief' to an integer. Default is 3. diff -r a959d4b99e4d -r 80050ac10dbf lispref/display.texi --- a/lispref/display.texi Fri Jan 12 15:12:10 2001 +0000 +++ b/lispref/display.texi Fri Jan 12 15:21:00 2001 +0000 @@ -2467,9 +2467,12 @@ If this property is omitted, it defaults to 50. @item :margin @var{margin} -The @code{:margin} property specifies how many pixels to add as an extra -margin around the image. The value, @var{margin}, must be a -non-negative number; if it is not specified, the default is zero. +The @code{:margin} property specifies how many pixels to add as an +extra margin around the image. The value, @var{margin}, must be a a +non-negative number, or a pair @code{(@var{x} . @var{y})} of such +numbers. If it is a pair, @var{x} specifies how many pixels to add +horizontally, and @var{y} specifies how many pixels to add vertically. +If @code{:margin} is not specified, the default is zero. @item :relief @var{relief} The @code{:relief} property, if non-@code{nil}, adds a shadow rectangle diff -r a959d4b99e4d -r 80050ac10dbf src/ChangeLog --- a/src/ChangeLog Fri Jan 12 15:12:10 2001 +0000 +++ b/src/ChangeLog Fri Jan 12 15:21:00 2001 +0000 @@ -1,5 +1,29 @@ 2001-01-12 Gerd Moellmann + * xdisp.c (Vtool_bar_button_margin): Replaces tool_bar_button_margin. + (build_desired_tool_bar_string): Handle Vtool_bar_button_margin + being a pair of margins. + (syms_of_xdisp): Change DEFVAR_INT of tool-bar-button-margins + to DEFVAR_LISP. Extend doc. + + * xfns.c (Fimage_size, image_ascent): Adapt to the change of image + margins. + (lookup_image): If `:margin MARGIN' is specified, and MARGIN is a + pair of integers `(X . Y)', use X for the horizontal and Y for the + vertical margin. + (IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR): New enumerator. + (parse_image_spec): Check it. + (xbm_format, xpm_format, pbm_format, png_format, jpeg_format) + (tiff_format, gif_format, gs_format): Use + IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR for :margin. + + * xterm.c (x_produce_image_glyph, x_draw_image_foreground) + (x_draw_image_relief, x_draw_image_foreground_1) + (x_draw_image_glyph_string): Adapt to the change of image margins. + + * dispextern.h (struct image): Replace member `margin' with + `hmargin' and `vmargin'. + * xdisp.c (Fdump_tool_bar_row) [GLYPH_DEBUG]: Add parameters ROW and GLYPHS.