[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can someone explain this code in xterm.c?
From: |
Richard Stallman |
Subject: |
Re: Can someone explain this code in xterm.c? |
Date: |
Mon, 28 Apr 2003 00:38:35 -0400 |
In x_set_window_size_1, the vertical_scroll_bar_extra setting may be
set to a non-integral fraction of the canonical column width of the
frame:
It appears to me that vertical_scroll_bar_extra holds the
width in pixels of the scroll bar, in all cases. Its name is
misleading.
You would think that FRAME_SCROLL_BAR_PIXEL_WIDTH has that value,
but it is different. It records the specified pixel width of the
scroll bar, or 0 if it has not been specified.
Perhaps both names should be changed.
Anywhere else (including the normal X widget case, GTK, W32, and MAC
ports), the vertical_scroll_bar_extra is set to an multiple of the
canonical column width.
I think there are some other places where it uses
FRAME_SCROLL_BAR_PIXEL_WIDTH for this.
This setting is used in the calculation of the total width of the
frame window (in macro CHAR_TO_PIXEL_WIDTH), but in other parts of the
code, the width of the scroll bar _area_ is always calculated as the
number of scroll bar colums multiplied by the font width (canonical x
unit).
I think that in some cases the actual display of the scroll bar is
determined by the number of columns. You can specify a non-integral
width, but it leaves the excess blank.
I don't remember the reason it is done this way, but I do remember
there was one.