1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-06 05:03:17 +01:00

- [TUI] ensured the help window uses 'help-dialog' configuration directives;

- [TUI] changed default color for info windows.
This commit is contained in:
cage 2024-08-10 10:29:41 +02:00
parent e24f9f2911
commit e6308f742b
4 changed files with 16 additions and 11 deletions

View File

@ -72,9 +72,9 @@ help-dialog.foreground = cyan
# info dialog style
info-dialog.background = blue
info-dialog.background = white
info-dialog.foreground = yellow
info-dialog.foreground = black
# error dialog style

View File

@ -585,8 +585,8 @@ each leaf (as strings)"
and `make-blocking-list-dialog-window') showing the full docstring for a command"
(declare (ignore x))
(when-let* ((function (help-fields-get-function fields))
(bg (swconf:win-bg swconf:+key-help-dialog+))
(fg (swconf:win-fg swconf:+key-help-dialog+)))
(bg (swconf:win-bg swconf:+key-info-dialog+))
(fg (swconf:win-fg swconf:+key-info-dialog+)))
(windows:make-blocking-message-dialog specials:*main-window*
nil
(function-name function)
@ -700,12 +700,15 @@ and `make-blocking-list-dialog-window') showing the full docstring for a command
actual-fields
actual-lines
#'help-expand
(_ "Quick help"))
(_ "Quick help")
swconf:+key-help-dialog+)
(line-oriented-window:make-blocking-list-dialog-window specials:*main-window*
'((:text "dummy"))
no-help-message
(lambda (a b)
(declare (ignore a b))))))
(declare (ignore a b)))
(_ "No help available")
swconf:+key-help-dialog+)))
(cl-ppcre:ppcre-syntax-error (e)
(ui:error-message (format nil
(_ "invalid regular expression ~s ~a")

View File

@ -502,7 +502,9 @@ this exact quantity would go beyond the length or rows or zero."
(string= event "^G")))
(defun make-blocking-list-dialog-window (screen all-fields text-lines callback
&optional (title (_ "Information")))
&optional
(title (_ "Information"))
(color-config-directive swconf:+key-info-dialog+))
"Draw a window with a scrollable list of entries, pressing enter
will fire the `callback' function (with the selected field from `all-fields'
and text from `text-line'. This window is fitten into `screen' sizes."
@ -521,8 +523,8 @@ will fire the `callback' function (with the selected field from `all-fields'
(* 0.5 window-width))))
(window-y (truncate (- (* 0.5 (win-height screen))
(* 0.5 window-height))))
(bg (swconf:win-bg swconf:+key-info-dialog+))
(fg (swconf:win-fg swconf:+key-info-dialog+))
(bg (swconf:win-bg color-config-directive))
(fg (swconf:win-fg color-config-directive))
(high-level-window (make-instance 'simple-line-navigation-window
:single-row-height 1
:uses-border-p t

View File

@ -2245,8 +2245,8 @@ Often would be possible to generate a new identity (i.e. a new certificate).
(defun show-about-window ()
"Show an informative window about this program"
(let ((lines (text-utils:split-lines +help-about-message+))
(bg (swconf:win-bg swconf:+key-help-dialog+))
(fg (swconf:win-fg swconf:+key-help-dialog+)))
(bg (swconf:win-bg swconf:+key-info-dialog+))
(fg (swconf:win-fg swconf:+key-info-dialog+)))
(windows:make-blocking-message-dialog *main-window*
nil
(_ "About this software")