Mercurial > hg > xemacs-beta
diff lisp/dialog.el @ 863:42375619fa45
[xemacs-hg @ 2002-06-04 06:03:59 by andyp]
merge 21.4 windows changes, minimally tested
author | andyp |
---|---|
date | Tue, 04 Jun 2002 06:05:53 +0000 |
parents | 047d37eb70d7 |
children | 5de13d96e131 |
line wrap: on
line diff
--- a/lisp/dialog.el Mon Jun 03 12:24:14 2002 +0000 +++ b/lisp/dialog.el Tue Jun 04 06:05:53 2002 +0000 @@ -308,6 +308,8 @@ The frame is made a child of this frame (defaults to the selected frame). :properties Additional properties of the frame, as well as `dialog-frame-plist'. +:autosize + If t the frame is sized to exactly fit the widgets given by :spec. --------------------------------------------------------------------------- @@ -681,6 +683,7 @@ (:parent (selected-frame)) :modal :properties + :autosize :spec) () (flet ((create-dialog-box-frame () @@ -728,6 +731,7 @@ vertical-scrollbar-visible-p nil horizontal-scrollbar-visible-p nil unsplittable t + internal-border-width 8 left ,(+ fleft (- (/ fwidth 2) (/ (* dfwidth fontw) @@ -738,6 +742,19 @@ 2))))))) (set-face-foreground 'modeline [default foreground] frame) (set-face-background 'modeline [default background] frame) + ;; resize before mapping + (when cl-autosize + (set-frame-pixel-size + frame + (image-instance-width + (glyph-image-instance cl-spec + (frame-selected-window frame))) + (image-instance-height + (glyph-image-instance cl-spec + (frame-selected-window frame))))) + ;; somehow, even though the resizing is supposed + ;; to be while the frame is not visible, a + ;; visible resize is perceptible (unless unmapped (make-frame-visible frame)) (let ((newbuf (generate-new-buffer " *dialog box*"))) (set-buffer-dedicated-frame newbuf frame)