emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-real ca52aef 110/160: Updated customizations; color


From: ELPA Syncer
Subject: [elpa] externals/org-real ca52aef 110/160: Updated customizations; color scheme
Date: Wed, 6 Oct 2021 16:58:26 -0400 (EDT)

branch: externals/org-real
commit ca52aef953e3b5cb496b67ec118091ff88586714
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>

    Updated customizations; color scheme
---
 org-real.el | 38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/org-real.el b/org-real.el
index cc695a0..8018be0 100644
--- a/org-real.el
+++ b/org-real.el
@@ -137,6 +137,16 @@
   :type 'number
   :group 'org-real)
 
+(defcustom org-real-tooltips t
+  "Show tooltips in an org real diagram."
+  :type 'boolean
+  :group 'org-real)
+
+(defcustom org-real-tooltip-timeout 0.5
+  "Idle time before showing tooltip in org real diagram."
+  :type 'number
+  :group 'org-real)
+
 ;;;; Faces
 
 (defface org-real-default nil
@@ -167,7 +177,7 @@
 
 (face-spec-set
  'org-real-rel
- '((t :foreground "orange"))
+ '((t :foreground "hot pink"))
  'face-defface-spec)
 
 (defface org-real-popup nil
@@ -176,7 +186,7 @@
 
 (face-spec-set
  'org-real-popup
- '((t :background "light slate blue"
+ '((t :background "midnight blue"
       :foreground "white"))
  'face-defface-spec)
 
@@ -1092,15 +1102,17 @@ If INCLUDE-ON-TOP is non-nil, also include height on 
top of box."
           (save-excursion
             (if (eq dir 'entered)
                 (progn
-                  (setq timer
-                        (run-with-idle-timer
-                         0.3 nil
-                         (lambda ()
-                           (if (slot-boundp box :metadata)
-                               (org-real--popup metadata)
-                             (if (and (slot-boundp box :name) (slot-boundp box 
:rel))
-                                 (with-slots ((rel-name name)) rel-box
-                                   (org-real--popup (format "The %s is %s the 
%s." name rel rel-name))))))))
+                  (if org-real-tooltips
+                      (setq timer
+                            (run-with-idle-timer
+                             org-real-tooltip-timeout nil
+                             (lambda ()
+                               (if (slot-boundp box :metadata)
+                                   (org-real--tooltip metadata)
+                                 (if (and (slot-boundp box :name) (slot-boundp 
box :rel))
+                                     (with-slots ((rel-name name)) rel-box
+                                       (org-real--tooltip (format "The %s is 
%s the %s."
+                                                                  name rel 
rel-name)))))))))
                   (if (slot-boundp box :rel-box)
                       (org-real--draw rel-box 'rel))
                   (org-real--draw box 'selected))
@@ -1739,9 +1751,9 @@ characters if possible."
 
 ;;;; Utility expressions
 
-(defun org-real--popup (str)
+(defun org-real--tooltip (str)
   "Show a popup tooltip with STR contents."
-  (popup-tip str
+  (popup-tip (concat "\n" str "\n")
              :parent-offset 1
              :margin org-real-padding-x))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]