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

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

[elpa] externals/modus-operandi-theme a745281 053/153: Minor tweaks to c


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme a745281 053/153: Minor tweaks to custom modeline 'moody' option
Date: Thu, 18 Mar 2021 13:47:38 -0400 (EDT)

branch: externals/modus-operandi-theme
commit a745281824186c50d2762b3c96a9649b24e7ffa5
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Minor tweaks to custom modeline 'moody' option
    
    * modus-operandi-theme.el (modus-operandi-theme-mode-line-attrs):
    Add optional fg-distant.  Used as a distant-foreground property
    when the 'moody' option is enabled.
    (custom-theme-set-faces): Tweak mode-line and mode-line-inactive
    faces.  The latter no longer uses a distant-foreground property,
    in the interest of usability
    
    * modus-vivendi-theme.el (modus-vivendi-theme-mode-line-attrs):
    Add optional fg-distant.  Used as a distant-foreground property
    when the 'moody' option is enabled.
    (custom-theme-set-faces): Tweak mode-line and mode-line-inactive
    faces.  The latter no longer uses a distant-foreground property,
    in the interest of usability
    
    For an ongoing discussion, refer to issue 80:
    https://gitlab.com/protesilaos/modus-themes/-/issues/80.  Thanks to
    Nicolas De Jaeghere for the valuable feedback!
---
 modus-operandi-theme.el | 17 ++++++++++-------
 modus-vivendi-theme.el  | 17 ++++++++++-------
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index bc9752f..b659969 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -793,7 +793,7 @@ set to `rainbow'."
     (_ (list :background bg :foreground fg))))
 
 (defun modus-operandi-theme-mode-line-attrs
-    (fg bg fg-alt bg-alt border border-3d &optional alt-style border-width)
+    (fg bg fg-alt bg-alt border border-3d &optional alt-style border-width 
fg-distant)
   "Colour combinations for `modus-operandi-theme-mode-line'.
 
 FG and BG are the default colours.  FG-ALT and BG-ALT are meant
@@ -806,7 +806,11 @@ Optional ALT-STYLE applies an appropriate style to the mode
 line's box property.
 
 Optional BORDER-WIDTH specifies an integer for the width of the
-rectangle that produces the box effect."
+rectangle that produces the box effect.
+
+Optional FG-DISTANT should be close to the main background
+values.  It is intended to be used as a distant-foreground
+property."
   (pcase modus-operandi-theme-mode-line
     ('3d
      `(:foreground ,fg-alt :background ,bg-alt
@@ -814,7 +818,8 @@ rectangle that produces the box effect."
                                      :color ,border-3d
                                      :style ,(and alt-style 
'released-button))))
     ('moody
-     `(:foreground ,fg-alt :background ,bg-alt :underline ,border :overline 
,border))
+     `(:foreground ,fg-alt :background ,bg-alt :underline ,border :overline 
,border
+                   :distant-foreground ,fg-distant))
     (_
      `(:foreground ,fg :background ,bg :box ,border))))
 
@@ -3073,15 +3078,13 @@ Also bind `class' to ((class color) (min-colors 89))."
 ;;;;; modeline
    `(mode-line ((,class ,@(modus-operandi-theme-mode-line-attrs
                            fg-active bg-active fg-dim bg-active
-                           fg-alt bg-active 'alt-style)
-                        :distant-foreground ,bg-main)))
+                           fg-alt bg-active 'alt-style nil bg-main))))
    `(mode-line-buffer-id ((,class :inherit bold)))
    `(mode-line-emphasis ((,class :inherit bold :foreground ,blue-active)))
    `(mode-line-highlight ((,class :inherit modus-theme-active-blue :box 
(:line-width -1 :style pressed-button))))
    `(mode-line-inactive ((,class ,@(modus-operandi-theme-mode-line-attrs
                                     fg-inactive bg-inactive fg-alt bg-dim
-                                    bg-region bg-active)
-                                 :distant-foreground ,bg-alt)))
+                                    bg-region bg-active))))
 ;;;;; mood-line
    `(mood-line-modified ((,class :foreground ,magenta-active)))
    `(mood-line-status-error ((,class :inherit bold :foreground ,red-active)))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 901252f..80f9b79 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -793,7 +793,7 @@ set to `rainbow'."
     (_ (list :background bg :foreground fg))))
 
 (defun modus-vivendi-theme-mode-line-attrs
-    (fg bg fg-alt bg-alt border border-3d &optional alt-style border-width)
+    (fg bg fg-alt bg-alt border border-3d &optional alt-style border-width 
fg-distant)
   "Colour combinations for `modus-vivendi-theme-mode-line'.
 
 FG and BG are the default colours.  FG-ALT and BG-ALT are meant
@@ -806,7 +806,11 @@ Optional ALT-STYLE applies an appropriate style to the mode
 line's box property.
 
 Optional BORDER-WIDTH specifies an integer for the width of the
-rectangle that produces the box effect."
+rectangle that produces the box effect.
+
+Optional FG-DISTANT should be close to the main background
+values.  It is intended to be used as a distant-foreground
+property."
   (pcase modus-vivendi-theme-mode-line
     ('3d
      `(:foreground ,fg-alt :background ,bg-alt
@@ -814,7 +818,8 @@ rectangle that produces the box effect."
                                      :color ,border-3d
                                      :style ,(and alt-style 
'released-button))))
     ('moody
-     `(:foreground ,fg-alt :background ,bg-alt :underline ,border :overline 
,border))
+     `(:foreground ,fg-alt :background ,bg-alt :underline ,border :overline 
,border
+                   :distant-foreground ,fg-distant))
     (_
      `(:foreground ,fg :background ,bg :box ,border))))
 
@@ -3073,15 +3078,13 @@ Also bind `class' to ((class color) (min-colors 89))."
 ;;;;; modeline
    `(mode-line ((,class ,@(modus-vivendi-theme-mode-line-attrs
                            fg-active bg-active fg-dim bg-active
-                           fg-alt bg-active 'alt-style)
-                        :distant-foreground ,bg-main)))
+                           fg-alt bg-active 'alt-style nil bg-main))))
    `(mode-line-buffer-id ((,class :inherit bold)))
    `(mode-line-emphasis ((,class :inherit bold :foreground ,blue-active)))
    `(mode-line-highlight ((,class :inherit modus-theme-active-blue :box 
(:line-width -1 :style pressed-button))))
    `(mode-line-inactive ((,class ,@(modus-vivendi-theme-mode-line-attrs
                                     fg-inactive bg-inactive fg-alt bg-dim
-                                    bg-region bg-active)
-                                 :distant-foreground ,bg-alt)))
+                                    bg-region bg-active))))
 ;;;;; mood-line
    `(mood-line-modified ((,class :foreground ,magenta-active)))
    `(mood-line-status-error ((,class :inherit bold :foreground ,red-active)))



reply via email to

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