diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-09-21 00:59:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-09-21 00:59:54 +0000 |
commit | fd475e2455917054e071d909fcb294ad9bd2893c (patch) | |
tree | f1697fb9e8fc0926c49b9a65e6da7a20698d43d2 /src | |
parent | 55d4c7535fc52935ce93dcb81eb33f72ad9772e3 (diff) | |
download | emacs-fd475e2455917054e071d909fcb294ad9bd2893c.tar.gz |
(VERTICAL_SCROLL_BAR_INSIDE_WIDTH): Add frame as an
argument, and use it to decrease the width in the case of a
left-side scroll bar; this prevents the bar and adjacent text
from scrunching together.
(LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM): Add constant.
(VERTICAL_SCROLL_BAR_INSIDE_HEIGHT): New arg F (not used).
(VERTICAL_SCROLL_BAR_TOP_RANGE): New arg F (not used).
Diffstat (limited to 'src')
-rw-r--r-- | src/xterm.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/xterm.h b/src/xterm.h index 60643d8c1a8..ca5fc9e88c6 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -602,8 +602,13 @@ struct scroll_bar { /* Return the inside width of a vertical scroll bar, given the outside width. */ -#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(width) \ - ((width) - VERTICAL_SCROLL_BAR_LEFT_BORDER - VERTICAL_SCROLL_BAR_RIGHT_BORDER) +#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \ + ((width) \ + - VERTICAL_SCROLL_BAR_LEFT_BORDER \ + - VERTICAL_SCROLL_BAR_RIGHT_BORDER \ + - (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \ + ? LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM \ + : 0)) /* Return the length of the rectangle within which the top of the handle must stay. This isn't equivalent to the inside height, @@ -612,12 +617,12 @@ struct scroll_bar { This is the real range of motion for the scroll bar, so when we're scaling buffer positions to scroll bar positions, we use this, not VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */ -#define VERTICAL_SCROLL_BAR_TOP_RANGE(height) \ - (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (height) - VERTICAL_SCROLL_BAR_MIN_HANDLE) +#define VERTICAL_SCROLL_BAR_TOP_RANGE(f, height) \ + (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) - VERTICAL_SCROLL_BAR_MIN_HANDLE) /* Return the inside height of vertical scroll bar, given the outside height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */ -#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(height) \ +#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f, height) \ ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER) @@ -640,6 +645,10 @@ struct scroll_bar { /* Minimum lengths for scroll bar handles, in pixels. */ #define VERTICAL_SCROLL_BAR_MIN_HANDLE (5) +/* For a left-side scroll bar, trimming off a few pixels prevents + text from glomming up against the scroll bar */ +#define LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM (2) + /* Manipulating pixel sizes and character sizes. Knowledge of which factors affect the overall size of the window should |