[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern a37053e995 23/65: More elegant progress indi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern a37053e995 23/65: More elegant progress indicator |
Date: |
Mon, 7 Mar 2022 12:57:46 -0500 (EST) |
branch: externals/org-modern
commit a37053e995c8ad37d9bfc05e3b2e579e7b3b1c06
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
More elegant progress indicator
---
example.org | 2 +-
org-modern.el | 21 ++++++---------------
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/example.org b/example.org
index 676f7cd653..6a59ff3428 100644
--- a/example.org
+++ b/example.org
@@ -12,7 +12,7 @@ which are styled by =org-modern=.
**** Fourth level
***** Fifth level
-* Task Lists [1/3]
+* Task Lists [1/3] [33%]
- [X] Write =org-modern=
- [-] Publish =org-modern=
- [ ] Fix all the bugs
diff --git a/org-modern.el b/org-modern.el
index a002f40d3b..acfb6f91b7 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -138,10 +138,10 @@ Set to nil to disable styling checkboxes."
"Prettify todo statistics."
:type 'boolean)
-(defcustom org-modern-progress " ▁▂▃▄▅▆▇█"
- "Add a progress bar to the todo statistics.
-Set to nil to disable the progress bar."
- :type '(choice (const nil) string))
+(defcustom org-modern-progress ["○""◔""◐""◕""●"]
+ "Add a progress indicator to the todo statistics.
+Set to nil to disable the indicator."
+ :type '(choice (const nil) (vector string)))
(defgroup org-modern-faces nil
"Faces used by `org-modern'."
@@ -183,11 +183,6 @@ Set to nil to disable the progress bar."
'((t :inherit org-modern-done))
"Face used for todo statistics labels.")
-(defface org-modern-progress
- '((((background light)) :foreground "gray40")
- (t :foreground "gray60"))
- "Face used for todo statistics progress bar.")
-
(defface org-modern-date-active
'((t :inherit org-modern-done))
"Face used for active date labels.")
@@ -241,7 +236,7 @@ Set to nil to disable the progress bar."
"Prettify headline todo statistics."
(let ((label (propertize (match-string 1) 'face 'org-modern-statistics)))
(when org-modern-progress
- (let ((idx (ceiling
+ (let ((idx (floor
(* (1- (length org-modern-progress))
(if (match-beginning 2)
(* 0.01 (string-to-number (match-string 2)))
@@ -249,11 +244,7 @@ Set to nil to disable the progress bar."
(if (= q 0)
1.0
(/ (* 1.0 (string-to-number (match-string 3)))
q))))))))
- (setq label (concat
- (propertize (char-to-string (aref org-modern-progress
idx))
- 'face 'org-modern-progress)
- " "
- label))))
+ (setq label (concat (aref org-modern-progress idx) " " label))))
(setq label (concat " " label " "))
(add-face-text-property 0 (length label)
'org-modern-statistics 'append label)
- [elpa] externals/org-modern b66f3ff985 08/65: README: Note that the package is still early in its development., (continued)
- [elpa] externals/org-modern b66f3ff985 08/65: README: Note that the package is still early in its development., ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern ff1160a03c 07/65: org-modern-label: Fix line-spacing handling, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern d28951932a 13/65: Ensure that tags stay editable (See #2), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern be679b3a79 14/65: Improve cursor placement on TODO keywords, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern a84994dc77 15/65: Improve cursor placement on timestamps (See #2), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern b17d32c576 16/65: README rewording, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 6b925b71ee 19/65: Add org-modern-label-border, do not overwrite line-spacing, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 7ceca7a3cc 20/65: More beautiful checkboxes, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 58252d0955 21/65: Fix typo (Fix #4), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 8abe22886a 22/65: Improve checkboxes, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern a37053e995 23/65: More elegant progress indicator,
ELPA Syncer <=
- [elpa] externals/org-modern 8a0bce9661 26/65: Blocks: Add wrap-prefix to support visual-line-mode, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 008f6baa8a 27/65: Improve block font locking, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern a63a427991 28/65: Fix docstring, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern d2bda1d449 29/65: Improve table editability, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern d6e8889e32 31/65: Fix indented tables, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern f0532357fe 32/65: Handle upper case block keywords, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 14637f0a5f 34/65: Fix source block indicators for source blocks with empty lines, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 6b13500969 38/65: Improve docstring, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern f45be59ff5 46/65: org-modern-keyword: Configurable replacement, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern b4d6b37eba 47/65: README: Expand on the current limitations, ELPA Syncer, 2022/03/07