small fixes for macOS

This commit is contained in:
polos 2020-12-08 18:26:41 +01:00
parent 7f3a2145ed
commit 9191f4a5eb
2 changed files with 7 additions and 2 deletions

View file

@ -148,7 +148,8 @@
(x:do-with (qset *main*)
("size" '(800 500))
("windowTitle" "Simple Lisp Editor"))
(! "setFixedHeight" *command* (+ (second (font-metrics-size))
(! "setFixedHeight" *command* (+ #+darwin 1 #-darwin 0
(second (font-metrics-size))
(* 2 (! "frameWidth" *command*))))
(qset-color *output* |QPalette.Base| "lavender")
(dolist (ed (list *editor* *command*))

View file

@ -44,11 +44,15 @@
(flet ((str (x)
(format nil "~:D" x)))
(x:when-it (funcall-protect (lambda (x) (float x *precision*)) n)
(|setText| *float* (princ-to-string x:it)))
(|setText| *float* (princ-to-string x:it)
#+darwin
(|repaint| *float*)))
(let* ((num (str (numerator n)))
(den (str (denominator n)))
(dif (- (length den) (length num))))
(|setText| *real* (format nil "<pre><u>~A~A</u><br>~A" (if (plusp dif) (make-string dif) "") num den))
#+darwin
(|repaint| *real*)
(|setEnabled| (qfind-child *main* "blah") (= 1 (denominator n))))))
(defun clear-display ()