[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide a71554c68d 121/230: partial-lines in header margins
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide a71554c68d 121/230: partial-lines in header margins, more options |
Date: |
Sun, 7 Jul 2024 19:00:22 -0400 (EDT) |
branch: elpa/dslide
commit a71554c68dd31ab7eb17f7e1791f647523550353
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
partial-lines in header margins, more options
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
dslide.el | 43 ++++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/dslide.el b/dslide.el
index 174b26979b..890776ef2a 100644
--- a/dslide.el
+++ b/dslide.el
@@ -170,10 +170,22 @@ The current time will be used as a fallback."
:type 'boolean
:group 'dslide)
-;; TODO make this number and support partial lines
-(defcustom dslide-content-margin-top 2
- "Specify the margin between the slide header and its content."
- :type 'integer
+(defcustom dslide-margin-title-above 0.5
+ "Margin between header title and the top of the window.
+Can be a float or integer."
+ :type 'number
+ :group 'dslide)
+
+(defcustom dslide-margin-title-below 0.5
+ "Margin between title and other header info.
+Can be a float or integer."
+ :type 'number
+ :group 'dslide)
+
+(defcustom dslide-margin-content 1.5
+ "Margin between the slide header and its content.
+Can be a float or integer."
+ :type 'number
:group 'dslide)
(defcustom dslide-slide-in-effect t
@@ -181,10 +193,9 @@ The current time will be used as a fallback."
:type 'boolean
:group 'dslide)
-;; TODO support partial lines
(defcustom dslide-slide-in-blank-lines 15
"Line height of the slide-in effect."
- :type 'integer
+ :type 'number
:group 'dslide)
(defcustom dslide-feedback-messages
@@ -2061,8 +2072,7 @@ assumes the buffer is restricted and that there is a
first tree."
(setq dslide--header-overlay
(make-overlay (point-min) (+ 1 (point-min))))
- (let* ((blank-lines dslide-content-margin-top)
- (keywords (org-collect-keywords
+ (let* ((keywords (org-collect-keywords
'("TITLE" "EMAIL" "AUTHOR" "DATE")))
(title (or dslide-title
(cadr (assoc-string "TITLE" keywords))
@@ -2082,8 +2092,9 @@ assumes the buffer is restricted and that there is a
first tree."
(if dslide-header
(overlay-put
dslide--header-overlay 'before-string
- (concat (propertize title 'face 'org-document-title)
- (dslide--info-face "\n")
+ (concat (dslide--margin-lines dslide-margin-title-above)
+ (propertize title 'face 'org-document-title)
+ (dslide--margin-lines dslide-margin-title-below)
(when (and dslide-header-date date)
(dslide--info-face (concat date " ")))
(when (and dslide-header-author author)
@@ -2095,17 +2106,19 @@ assumes the buffer is restricted and that there is a
first tree."
(concat (dslide--info-face "\n")
(dslide--get-parents
dslide-breadcrumb-separator)))
- (dslide--get-blank-lines blank-lines)))
+ (dslide--margin-lines dslide-margin-content)))
(overlay-put dslide--header-overlay 'before-string
- (dslide--get-blank-lines blank-lines)))))
+ (dslide--margin-lines dslide-margin-content)))))
(defun dslide--info-face (s)
(propertize s 'face 'org-document-info))
-(defun dslide--get-blank-lines (lines)
- "Return breaks by LINES."
- (dslide--info-face (make-string lines ?\12))) ; ?\12 is newline char
+(defun dslide--margin-lines (lines)
+ (dslide--info-face
+ (if (display-graphic-p)
+ (propertize "\n" 'line-height (float lines))
+ (make-string (floor lines) ?\n))))
(defun dslide--breadcrumbs-reducer (delim)
(lambda (previous next)
- [nongnu] elpa/dslide 648cb7247a 115/230: ms- -> dslide-, (continued)
- [nongnu] elpa/dslide 648cb7247a 115/230: ms- -> dslide-, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide d74b869a12 117/230: back to feature parity with demo.org, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 53ab5eb653 101/230: convert image action fullscreen into an option, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide e0be8b31fa 112/230: renaming user commands & simplifying stateful-sequence, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 50fffb5824 124/230: babel action should not use default implementation of end, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide d0ae139d26 114/230: Version up, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide d71709fd00 118/230: custom action example from video (it works!), ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0419d1310d 089/230: remove dead function, ms-display-base, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a6a0d57738 110/230: init -> forward, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f07a873181 128/230: per-slide option to have no header, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a71554c68d 121/230: partial-lines in header margins, more options,
ELPA Syncer <=
- [nongnu] elpa/dslide 72ffe8494d 116/230: !some cleanup of package renaming, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 6aea1165e1 141/230: Updated demo.org, rearranged, designing into a manual of sorts, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 7028c07ace 140/230: prefer eobp and bobp to point & point-min/max comparison, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide c1267f7508 136/230: Checkdoc cleanups, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f295183145 135/230: Bumping to 0.3.2 - expect about 95% name stability from here, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide b06f330ca3 146/230: move highlight cleanup to proper cleanup function, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 69e2a1422b 134/230: dslide-presentation -> dslide-deck, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 67d35380e5 142/230: clean up dslide--stop, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide aa9c8bcfa9 123/230: downgrade reporting weird progress values from warning to message, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide b38d6fef4c 149/230: self-canceling animation timers, ELPA Syncer, 2024/07/07