[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111506: Introduce scroll-bar-adjust-
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111506: Introduce scroll-bar-adjust-thumb-portion. |
Date: |
Fri, 11 Jan 2013 05:57:45 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111506
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Fri 2013-01-11 05:57:45 +0100
message:
Introduce scroll-bar-adjust-thumb-portion.
* xterm.c (scroll-bar-adjust-thumb-portion): New variable to
determine whether scroll bar thumb size should be adjusted or
not. Use variable for MOTIF.
* gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
GTK.
modified:
src/ChangeLog
src/gtkutil.c
src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-01-13 12:08:31 +0000
+++ b/src/ChangeLog 2013-01-11 04:57:45 +0000
@@ -1,3 +1,12 @@
+2012-12-31 Adam Sjøgren <address@hidden>
+
+ * xterm.c (scroll-bar-adjust-thumb-portion): New variable to
+ determine whether scroll bar thumb size should be adjusted or
+ not. Use variable for MOTIF.
+
+ * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
+ GTK.
+
2013-01-13 Jan Djärv <address@hidden>
* nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c 2013-01-10 17:45:08 +0000
+++ b/src/gtkutil.c 2013-01-11 04:57:45 +0000
@@ -3795,13 +3795,17 @@
adj = gtk_range_get_adjustment (GTK_RANGE (wscroll));
- /* We do the same as for MOTIF in xterm.c, assume 30 chars per line
- rather than the real portion value. This makes the thumb less likely
- to resize and that looks better. */
- portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
- /* When the thumb is at the bottom, position == whole.
- So we need to increase `whole' to make space for the thumb. */
- whole += portion;
+ if (scroll_bar_adjust_thumb_portion_p)
+ {
+ /* We do the same as for MOTIF in xterm.c, use 30 chars per
+ line rather than the real portion value. This makes the
+ thumb less likely to resize and that looks better. */
+ portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
+
+ /* When the thumb is at the bottom, position == whole.
+ So we need to increase `whole' to make space for the thumb. */
+ whole += portion;
+ }
if (whole <= 0)
top = 0, shown = 1;
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2013-01-04 19:22:37 +0000
+++ b/src/xterm.c 2013-01-11 04:57:45 +0000
@@ -4802,21 +4802,24 @@
#ifdef USE_MOTIF
- /* We use an estimate of 30 chars per line rather than the real
- `portion' value. This has the disadvantage that the thumb size
- is not very representative, but it makes our life a lot easier.
- Otherwise, we have to constantly adjust the thumb size, which
- we can't always do quickly enough: while dragging, the size of
- the thumb might prevent the user from dragging the thumb all the
- way to the end. but Motif and some versions of Xaw3d don't allow
- updating the thumb size while dragging. Also, even if we can update
- its size, the update will often happen too late.
- If you don't believe it, check out revision 1.650 of xterm.c to see
- what hoops we were going through and the still poor behavior we got. */
- portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
- /* When the thumb is at the bottom, position == whole.
- So we need to increase `whole' to make space for the thumb. */
- whole += portion;
+ if (scroll_bar_adjust_thumb_portion_p)
+ {
+ /* We use an estimate of 30 chars per line rather than the real
+ `portion' value. This has the disadvantage that the thumb size
+ is not very representative, but it makes our life a lot easier.
+ Otherwise, we have to constantly adjust the thumb size, which
+ we can't always do quickly enough: while dragging, the size of
+ the thumb might prevent the user from dragging the thumb all the
+ way to the end. but Motif and some versions of Xaw3d don't allow
+ updating the thumb size while dragging. Also, even if we can update
+ its size, the update will often happen too late.
+ If you don't believe it, check out revision 1.650 of xterm.c to see
+ what hoops we were going through and the still poor behavior we got.
*/
+ portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
+ /* When the thumb is at the bottom, position == whole.
+ So we need to increase `whole' to make space for the thumb. */
+ whole += portion;
+ }
if (whole <= 0)
top = 0, shown = 1;
@@ -10784,6 +10787,14 @@
Vx_toolkit_scroll_bars = Qnil;
#endif
+ DEFVAR_BOOL ("scroll-bar-adjust-thumb-portion",
+ scroll_bar_adjust_thumb_portion_p,
+ doc: /* Non-nil means adjust the thumb in the
+scroll bar to be less likely to resize which looks better.
+Set to nil if you want the thumb to fill the whole scroll bar
+when the entire buffer is visible. */);
+ scroll_bar_adjust_thumb_portion_p = 1;
+
staticpro (&last_mouse_motion_frame);
last_mouse_motion_frame = Qnil;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111506: Introduce scroll-bar-adjust-thumb-portion.,
Jan D. <=