1
0
Fork 0

- made 'about' help window, modal.

This commit is contained in:
cage 2023-02-17 15:05:09 +01:00
parent 801a7e8b3f
commit 81868075b4
4 changed files with 14 additions and 5 deletions

View File

@ -24,7 +24,7 @@
(define-constant +help-about-message+ (define-constant +help-about-message+
(format nil (format nil
"~a "~a
Copyright (C) 2019 cage Copyright (C) 2019,2020,2021,2022,2023 cage
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -2,6 +2,8 @@
(cl-syntax:use-syntax 'gui-utils:nodgui-color-syntax) (cl-syntax:use-syntax 'gui-utils:nodgui-color-syntax)
(defparameter *toplevel* gui:*tk*)
(a:define-constant +font-h1+ "sans 20 bold" :test #'string=) (a:define-constant +font-h1+ "sans 20 bold" :test #'string=)
(a:define-constant +font-h2+ "sans 15 bold" :test #'string=) (a:define-constant +font-h2+ "sans 15 bold" :test #'string=)

View File

@ -1,10 +1,16 @@
(in-package :client-menu-command) (in-package :client-menu-command)
(defun help-about () (defun help-about ()
(gui:with-modal-toplevel (toplevel :master nil :title (_ "About")) (let ((master gui-goodies:*toplevel*))
(let* ((editor (gui:make-text toplevel))) (gui:with-modal-toplevel (toplevel :master master :title (_ "About"))
(setf (gui:text editor) (format nil +help-about-message+)) (gui:transient toplevel master)
(gui:pack editor)))) (let* ((editor (make-instance 'gui:scrolled-text
:master toplevel
:cursor gui:+standard-cursor+
:use-horizontal-scrolling-p nil
:read-only t)))
(setf (gui:text editor) (format nil +help-about-message+))
(gui:pack editor :fill :both)))))
(defun quit () (defun quit ()
(comm:close-server) (comm:close-server)

View File

@ -3310,6 +3310,7 @@
(:gui-utils :nodgui.utils) (:gui-utils :nodgui.utils)
(:gui-shapes :nodgui.shapes)) (:gui-shapes :nodgui.shapes))
(:export (:export
:*toplevel*
:gui-resize-grid-all :gui-resize-grid-all
:confirm-deletion :confirm-deletion
:info-operation-completed :info-operation-completed