[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Height of tool bar doesn't shrink
From: |
MIYOSHI Masanori |
Subject: |
Height of tool bar doesn't shrink |
Date: |
Wed, 17 May 2006 20:40:46 +0900 |
User-agent: |
Wanderlust/2.15.3 (Almost Unreal) EMIKO/1.14.1 (Choanoflagellata) LIMIT/1.14.8 (Hajinosato) APEL/10.6 Emacs/22.0.50 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) |
In GNU Emacs 22.0.50 on Windows (and maybe on other platforms),
the height of the tool bar doesn't shrink.
This following operation reproduces the problem.
1 emacs -q
2 Evaluate the next sexp on the scratch buffer to create a buffer
whose tool bar is taller than usual.
(with-current-buffer (get-buffer-create "tmp")
(set (make-local-variable 'tool-bar-map)
(copy-keymap tool-bar-map))
(define-key-after
tool-bar-map (vector nil)
(list 'menu-item "" nil
:image (create-image (make-string (* 64 8) 0)
'pbm t :width 64 :height 64))))
3 Switch to the buffer.
C-x b tmp RET
;; Now the tool bar is taller than usual.
4 Switch back to the scratch buffer.
C-x b RET
;; The height of the tool bar is still taller than usual. I hope
;; that the height should shrink to the original one.
The following patch seems to fix the problem.
--- xdisp.c.orig 2006-05-16 22:35:06.997131800 +0900
+++ xdisp.c 2006-05-17 19:07:04.587084800 +0900
@@ -9549,6 +9549,7 @@
/* Make line the desired height and center it vertically. */
if ((height -= it->max_ascent + it->max_descent) > 0)
{
+ height %= FRAME_LINE_HEIGHT (it->f);
it->max_ascent += height / 2;
it->max_descent += (height + 1) / 2;
}
--
MIYOSHI Masanori http://miyoshi.meadowy.org/
- Height of tool bar doesn't shrink,
MIYOSHI Masanori <=