mirror of https://codeberg.org/cage/tinmop/
- changed sizes and title of window that shows tour links.
This commit is contained in:
parent
4dd530edb7
commit
e60b886c7d
|
@ -25,7 +25,7 @@
|
|||
:initarg :status-id
|
||||
:accessor status-id)))
|
||||
|
||||
(defun refresh-view-links-window-config (window config-window-key)
|
||||
(defun refresh-view-links-window-config (window config-window-key &key (center-position nil))
|
||||
(with-accessors ((croatoan-window croatoan-window)
|
||||
(selected-line-bg selected-line-bg)
|
||||
(selected-line-fg selected-line-fg)
|
||||
|
@ -41,17 +41,33 @@
|
|||
(reference-window (if command-line:*gemini-full-screen-mode*
|
||||
*gemini-toc-window*
|
||||
*thread-window*))
|
||||
(win-w (if command-line:*gemini-full-screen-mode*
|
||||
(- (win-width *main-window*)
|
||||
(win-width reference-window))
|
||||
(win-width reference-window)))
|
||||
(win-h (if command-line:*gemini-full-screen-mode*
|
||||
(swconf:config-gemini-fullscreen-links-height)
|
||||
(win-height reference-window)))
|
||||
(x (if command-line:*gemini-full-screen-mode*
|
||||
(win-width reference-window)
|
||||
(win-x reference-window)))
|
||||
(y 0))
|
||||
(win-w (cond
|
||||
(command-line:*gemini-full-screen-mode*
|
||||
(- (win-width *main-window*)
|
||||
(win-width reference-window)))
|
||||
(center-position
|
||||
(truncate (/ (win-width reference-window) 2)))
|
||||
(t
|
||||
(win-width reference-window))))
|
||||
(win-h (cond
|
||||
(command-line:*gemini-full-screen-mode*
|
||||
(swconf:config-gemini-fullscreen-links-height))
|
||||
(center-position
|
||||
(truncate (/ (win-height reference-window) 2)))
|
||||
(t
|
||||
(win-height reference-window))))
|
||||
(x (cond
|
||||
(command-line:*gemini-full-screen-mode*
|
||||
(win-width reference-window))
|
||||
(center-position
|
||||
(truncate (- (/ (win-width *main-window*) 2)
|
||||
(/ win-w 2))))
|
||||
(t
|
||||
(win-x reference-window))))
|
||||
(y (if command-line:*gemini-full-screen-mode*
|
||||
0
|
||||
(truncate (- (/ (win-height *main-window*) 2)
|
||||
(/ win-h 2))))))
|
||||
(setf (background croatoan-window)
|
||||
(tui:make-win-background bg))
|
||||
(setf (bgcolor croatoan-window) bg)
|
||||
|
|
|
@ -103,11 +103,16 @@
|
|||
title-window
|
||||
border-window
|
||||
open-links-window)
|
||||
())
|
||||
((center-position
|
||||
:initform nil
|
||||
:initarg :center-position
|
||||
:reader center-position-p
|
||||
:writer (setf center-position))))
|
||||
|
||||
(defmethod refresh-config :after ((object open-gemini-document-link-window))
|
||||
(open-attach-window:refresh-view-links-window-config object
|
||||
swconf:+key-open-message-link-window+))
|
||||
swconf:+key-open-message-link-window+
|
||||
:center-position (center-position-p object)))
|
||||
|
||||
(defmethod resync-rows-db ((object open-gemini-document-link-window)
|
||||
&key
|
||||
|
@ -193,13 +198,14 @@
|
|||
(error ()
|
||||
(ui:error-message (_ "Invalid regular expression")))))
|
||||
|
||||
(defun init-gemini-links (links)
|
||||
(defun init-gemini-links (links &key (title (_ "Links")) (center-position nil))
|
||||
(let* ((low-level-window (make-croatoan-window :enable-function-keys t)))
|
||||
(setf *open-message-link-window*
|
||||
(make-instance 'open-gemini-document-link-window
|
||||
:center-position center-position
|
||||
:top-row-padding 0
|
||||
:top-horizontal-padding 1
|
||||
:title (_ "Links")
|
||||
:title title
|
||||
:links links
|
||||
:single-row-height 2
|
||||
:uses-border-p t
|
||||
|
|
|
@ -2236,7 +2236,9 @@ gemini://gemini.circumlunar.space/docs/companion/subscription.gmi
|
|||
|
||||
(defun show-tour-links ()
|
||||
"Show a link window with all the links in the tour queue."
|
||||
(open-message-link-window:init-gemini-links (reverse tour))
|
||||
(open-message-link-window:init-gemini-links (reverse tour)
|
||||
:title (_ "Current links tour")
|
||||
:center-position t)
|
||||
(focus-to-open-message-link-window))
|
||||
|
||||
(defun save-selected-message-in-tour ()
|
||||
|
|
Loading…
Reference in New Issue