diff options
| author | John Wiegley <johnw@newartisans.com> | 2005-06-27 23:53:02 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2005-06-27 23:53:02 +0000 |
| commit | e2aa9a7a7bd360f46f5343c556c70081979fcddc (patch) | |
| tree | 6fc3d75045792ea2cdef5043d133b211cfe04da6 | |
| parent | c3789d871a5d68b3df36a9554633e60353354518 (diff) | |
(chess-images-determine-size): On Macs and
Windows, reduce the screen height by 80 instead of just 20, to
account for the Start/Status bar.
(chess-images-popup): Pass in a `font' to
`chess-display-popup-in-frame', so that the pixel height for each
graphical piece is computed correctly.
(chess-images-change-size): Foricbly popup the chess buffer when
changing the size of graphical pieces.
| -rw-r--r-- | chess-images.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chess-images.el b/chess-images.el index 58ddcd4..45259a3 100644 --- a/chess-images.el +++ b/chess-images.el @@ -197,7 +197,11 @@ called." chess-images-size (chess-images-best-size (- (if display (x-display-pixel-height display) - (display-pixel-height)) 20) + (display-pixel-height)) + ;; On Macs and Windows, account for + ;; the Start/Status bar + (if (memq window-system '(mac windows w32)) + 80 20)) (- (if display (x-display-pixel-width display) (display-pixel-width)) 20))))) @@ -224,7 +228,8 @@ called." chess-images-separate-frame))) ;; create the frame whenever necessary (chess-display-popup-in-frame (+ max-char-height 2) - max-char-width)) + max-char-width + (cdr (assq 'font (frame-parameters))))) (chess-display-popup-in-window))) (defun chess-images-piece-image (piece rank file) @@ -313,11 +318,12 @@ Common modes are: (window (get-buffer-window buffer)) (frame (and window (window-frame window)))) (setq chess-images-size size - chess-images-cache nil ) + chess-images-cache nil) (if frame (delete-frame frame t)) (chess-message 'redrawing-frame) (chess-display-update buffer t) + (chess-display-popup buffer) (chess-message 'redrawing-frame-done))) (defun chess-images-resize () |
