Permalink
Browse files

Make initial height a multiple of screen height

  • Loading branch information...
1 parent ac77700 commit 5ea53163bed68028d73c086179bfcdfa1d4bed0e @akkana committed Mar 13, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 .emacs-lisp/dotemacs.el
View
@@ -665,9 +665,12 @@
;; from the screen height (for panels, menubars and
;; whatnot), then divide by the height of a char to
;; get the height we want
- (add-to-list 'default-frame-alist
- (cons 'height (/ (- (x-display-pixel-height) 100)
- (frame-char-height)))))))
+ (add-to-list 'default-frame-alist
+ ; was (- (x-display-pixel-height) 100)
+ ; That produces an int, but with * we must convert
+ ; from float to int with floor.
+ (cons 'height (floor (/ (* (x-display-pixel-height) 0.85)
+ (frame-char-height))))))))
(set-frame-size-according-to-resolution)

0 comments on commit 5ea5316

Please sign in to comment.