summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-01-12 15:21:00 +0000
committerGerd Moellmann <gerd@gnu.org>2001-01-12 15:21:00 +0000
commitb30623bee027d57e63925e8b0d00505bc07625ac (patch)
treedb3646c6722b196abb74814468e3300b24c92482
parent35a415071e4b38acd205aea572bb084707237589 (diff)
downloademacs-b30623bee027d57e63925e8b0d00505bc07625ac.tar.gz
*** empty log message ***
-rw-r--r--etc/NEWS8
-rw-r--r--lispref/display.texi9
-rw-r--r--src/ChangeLog24
3 files changed, 35 insertions, 6 deletions
diff --git a/etc/NEWS b/etc/NEWS
index b2200a267fc..f3fa807b13e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -3642,8 +3642,9 @@ overlays that apply to the image.
`: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 @@ raised when the mouse moves over them.
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 --git a/lispref/display.texi b/lispref/display.texi
index 12be0ef10dd..4f218de4b1b 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -2467,9 +2467,12 @@ properties and overlays that apply to the image.
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 --git a/src/ChangeLog b/src/ChangeLog
index 713735c0746..d9432a3e88c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.