aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-04 04:48:13 +0000
committerRichard M. Stallman1997-07-04 04:48:13 +0000
commita672c74d731d96d777d261c16be6f280cf1376d9 (patch)
tree8f0ca1c1327363063aa7df8d3c774eee106c894f /src
parent85969cb1be0af86030b6245be81fa1cdc5f2e925 (diff)
downloademacs-a672c74d731d96d777d261c16be6f280cf1376d9.tar.gz
emacs-a672c74d731d96d777d261c16be6f280cf1376d9.zip
(x_set_scroll_bar_width): By default, use enough
columns to give 14 or more pixels.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xfns.c b/src/xfns.c
index fa837e6a4c0..070fe10615f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1986,18 +1986,23 @@ x_set_scroll_bar_width (f, arg, oldval)
1986 struct frame *f; 1986 struct frame *f;
1987 Lisp_Object arg, oldval; 1987 Lisp_Object arg, oldval;
1988{ 1988{
1989 int wid = FONT_WIDTH (f->output_data.x->font);
1990
1989 if (NILP (arg)) 1991 if (NILP (arg))
1990 { 1992 {
1993 /* Make the actual width at least 14 pixels
1994 and a multiple of a character width. */
1995 FRAME_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
1996 /* Use all of that space (aside from required margins)
1997 for the scroll bar. */
1991 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 0; 1998 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 0;
1992 FRAME_SCROLL_BAR_COLS (f) = 3; 1999
1993 if (FRAME_X_WINDOW (f)) 2000 if (FRAME_X_WINDOW (f))
1994 x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); 2001 x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f));
1995 } 2002 }
1996 else if (INTEGERP (arg) && XINT (arg) > 0 2003 else if (INTEGERP (arg) && XINT (arg) > 0
1997 && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f)) 2004 && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f))
1998 { 2005 {
1999 int wid = FONT_WIDTH (f->output_data.x->font);
2000
2001 if (XFASTINT (arg) <= 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM) 2006 if (XFASTINT (arg) <= 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM)
2002 XSETINT (arg, 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM + 1); 2007 XSETINT (arg, 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM + 1);
2003 2008