[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: installer: Put title into box of boxed window.
From: |
Danny Milosavljevic |
Subject: |
01/01: installer: Put title into box of boxed window. |
Date: |
Sun, 9 Jul 2017 11:56:32 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 28c4a7f93c628ec414f375120e1b13204e63cb7e
Author: Danny Milosavljevic <address@hidden>
Date: Sun Jul 9 17:55:15 2017 +0200
installer: Put title into box of boxed window.
* gnu/system/installer/utils.scm (boxed-window-decoration-refresh): Put
title into box.
(make-boxed-window): Reduce extra height.
---
gnu/system/installer/utils.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/system/installer/utils.scm b/gnu/system/installer/utils.scm
index 3bcd9e5..eab40e6 100644
--- a/gnu/system/installer/utils.scm
+++ b/gnu/system/installer/utils.scm
@@ -273,13 +273,13 @@ Ignore blank lines."
;(addstr win "X")
(box win (acs-vline) (acs-hline))
(if title
- (begin
+ (let ((title (string-append "[ " title " ]")))
;(move win 2 1)
;(hline win (acs-hline) (- (getmaxx win) 2))
(color-set! win livery-title)
(move win 1 1)
(clrtoeol win) ; kills one char too much at the end.
- (addstr win title #:y 1 #:x (round (/ (- (getmaxx win) (string-length
title)) 2)))))
+ (addstr win title #:y 0 #:x (round (/ (- (getmaxx win) (string-length
title)) 2)))))
(color-set! win 0)))
(define* (make-boxed-window orig height width starty startx #:key (title #f))
@@ -288,7 +288,7 @@ pair whose car is the inner window and whose cdr is the
frame."
(let* ((win (if orig
(derwin orig height width starty startx #:panel #t)
(newwin height width starty startx #:panel #t)))
- (ystart (if title 2 1)))
+ (ystart (if title 1 1)))
(let ((sw (derwin win (- (getmaxy win) ystart 1)
(- (getmaxx win) 2)
ystart 1 #:panel #t)))