diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-03-26 09:54:29 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-03-26 09:54:29 -0400 |
commit | 5941a2379dbcaa22f1da3f33dbcf38662727d164 (patch) | |
tree | 27f9cc00eeff00d556e8944e763ad50a7ab56808 | |
parent | d143ac25a36cc684dcab713a126aa1ed82014eb0 (diff) |
Auto-resize minibuffer background.
-rw-r--r-- | catbird/minibuffer.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/catbird/minibuffer.scm b/catbird/minibuffer.scm index 756b247..197b695 100644 --- a/catbird/minibuffer.scm +++ b/catbird/minibuffer.scm @@ -70,13 +70,15 @@ #:prompt %prompt))) (define-method (resize-minibuffer (minibuffer <minibuffer>) width) - (set! (painter (& minibuffer background)) - (with-style ((fill-color %background-color)) - (fill - (rectangle (vec2 0.0 0.0) - width - (+ (font-line-height (font (& minibuffer editor))) - (* %padding 2.0))))))) + (let ((bg (& minibuffer background))) + (set! (painter bg) + (with-style ((fill-color %background-color)) + (fill + (rectangle (vec2 0.0 0.0) + width + (+ (font-line-height (font (& minibuffer editor))) + (* %padding 2.0)))))) + (resize bg))) (define-method (clear-minibuffer (minibuffer <minibuffer>)) (clear-line (& minibuffer editor))) |