changeset 35278:80050ac10dbf

*** empty log message ***
author Gerd Moellmann <gerd@gnu.org>
date Fri, 12 Jan 2001 15:21:00 +0000
parents a959d4b99e4d
children 139991123d49
files etc/NEWS lispref/display.texi src/ChangeLog
diffstat 3 files changed, 35 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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
--- 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  <gerd@gnu.org>
 
+	* 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.