[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-vivendi-theme 8336e5a 061/110: Refine 3D modeline
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-vivendi-theme 8336e5a 061/110: Refine 3D modeline conditionality and tweak looks |
Date: |
Wed, 29 Apr 2020 21:40:07 -0400 (EDT) |
branch: externals/modus-vivendi-theme
commit 8336e5a7762be14fb820fd10269c908b159c2f22
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>
Refine 3D modeline conditionality and tweak looks
---
modus-operandi-theme.el | 32 +++++++++++++++++++++++++-------
modus-vivendi-theme.el | 32 +++++++++++++++++++++++++-------
2 files changed, 50 insertions(+), 14 deletions(-)
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index e76a7ef..c2b15df 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -408,11 +408,24 @@ between foreground and background is >= 7:1)."
;; Helper functions that are meant to ease the implementation of the
;; above customisation options.
-(defun modus-operandi-theme-modeline (col3d col)
- "Control the box colour of the mode line, either COL3D or COL."
+(defun modus-operandi-theme-modeline-box (col3d col &optional btn)
+ "Control the box properties of the mode line.
+COL3D is the border that is intended for the three-dimensional modeline.
+COL applies to the two-dimensional modeline.
+Optional BTN provides the 3d button style."
+ (let ((style (if btn 'released-button nil)))
+ (if modus-operandi-theme-3d-modeline
+ (list :line-width 1 :color col3d :style style)
+ (list :line-width 1 :color col :style nil))))
+
+(defun modus-operandi-theme-modeline-props (bg3d fg3d &optional bg fg)
+ "Control the background and foreground of the mode line.
+BG is the modeline's background.
+FG is the modeline's foreground.
+BG3D and FG3D apply to the three-dimensional modeline style."
(if modus-operandi-theme-3d-modeline
- (list :line-width 1 :color col3d :style 'released-button)
- (list :line-width 1 :color col :style nil)))
+ (list :background bg3d :foreground fg3d)
+ (list :background bg :foreground fg)))
(defun modus-operandi-theme-diffs (subtle-bg subtle-fg intense-bg intense-fg)
"Colour combinations for `modus-operandi-theme-subtle-diffs'.
@@ -2180,12 +2193,17 @@ AMOUNT is a customisation option."
`(message-mml ((,class (:foreground ,green-alt))))
`(message-separator ((,class (:background ,bg-alt :foreground
,fg-special-warm))))
;;;; modeline
- `(mode-line ((,class (:box ,(modus-operandi-theme-modeline bg-inactive
fg-inactive)
- :background ,bg-active :foreground
,fg-active))))
+ `(mode-line ((,class (:box ,(modus-operandi-theme-modeline-box bg-inactive
fg-inactive t)
+ ,@(modus-operandi-theme-modeline-props
+ bg-active fg-main
+ bg-active fg-active)))))
`(mode-line-buffer-id ((,class (:weight bold))))
`(mode-line-emphasis ((,class (:foreground ,blue-active :weight bold))))
`(mode-line-highlight ((,class (:inherit modus-theme-active-blue :box
(:line-width -1 :style pressed-button)))))
- `(mode-line-inactive ((,class (:box (:color ,bg-active) :background
,bg-inactive :foreground ,fg-inactive))))
+ `(mode-line-inactive ((,class (:box ,(modus-operandi-theme-modeline-box
bg-active bg-active)
+ ,@(modus-operandi-theme-modeline-props
+ bg-dim fg-inactive
+ bg-inactive fg-inactive)))))
;;;; mood-line
`(mood-line-modified ((,class (:foreground ,magenta-active))))
`(mood-line-status-error ((,class (:foreground ,red-active :weight bold))))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 0a5031f..9c33aae 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -408,11 +408,24 @@ between foreground and background is >= 7:1)."
;; Helper functions that are meant to ease the implementation of the
;; above customisation options.
-(defun modus-vivendi-theme-modeline (col3d col)
- "Control the box colour of the mode line, either COL3D or COL."
+(defun modus-vivendi-theme-modeline-box (col3d col &optional btn)
+ "Control the box properties of the mode line.
+COL3D is the border that is intended for the three-dimensional modeline.
+COL applies to the two-dimensional modeline.
+Optional BTN provides the 3d button style."
+ (let ((style (if btn 'released-button nil)))
+ (if modus-vivendi-theme-3d-modeline
+ (list :line-width 1 :color col3d :style style)
+ (list :line-width 1 :color col :style nil))))
+
+(defun modus-vivendi-theme-modeline-props (bg3d fg3d &optional bg fg)
+ "Control the background and foreground of the mode line.
+BG is the modeline's background.
+FG is the modeline's foreground.
+BG3D and FG3D apply to the three-dimensional modeline style."
(if modus-vivendi-theme-3d-modeline
- (list :line-width 1 :color col3d :style 'released-button)
- (list :line-width 1 :color col :style nil)))
+ (list :background bg3d :foreground fg3d)
+ (list :background bg :foreground fg)))
(defun modus-vivendi-theme-diffs (subtle-bg subtle-fg intense-bg intense-fg)
"Colour combinations for `modus-vivendi-theme-subtle-diffs'.
@@ -2180,12 +2193,17 @@ AMOUNT is a customisation option."
`(message-mml ((,class (:foreground ,green-alt))))
`(message-separator ((,class (:background ,bg-alt :foreground
,fg-special-warm))))
;;;; modeline
- `(mode-line ((,class (:box ,(modus-vivendi-theme-modeline bg-inactive
fg-inactive)
- :background ,bg-active :foreground
,fg-active))))
+ `(mode-line ((,class (:box ,(modus-vivendi-theme-modeline-box bg-inactive
fg-inactive t)
+ ,@(modus-vivendi-theme-modeline-props
+ bg-active fg-main
+ bg-active fg-active)))))
`(mode-line-buffer-id ((,class (:weight bold))))
`(mode-line-emphasis ((,class (:foreground ,blue-active :weight bold))))
`(mode-line-highlight ((,class (:inherit modus-theme-active-blue :box
(:line-width -1 :style pressed-button)))))
- `(mode-line-inactive ((,class (:box (:color ,bg-active) :background
,bg-inactive :foreground ,fg-inactive))))
+ `(mode-line-inactive ((,class (:box ,(modus-vivendi-theme-modeline-box
bg-active bg-active)
+ ,@(modus-vivendi-theme-modeline-props
+ bg-dim fg-inactive
+ bg-inactive fg-inactive)))))
;;;; mood-line
`(mood-line-modified ((,class (:foreground ,magenta-active))))
`(mood-line-status-error ((,class (:foreground ,red-active :weight bold))))
- [elpa] externals/modus-vivendi-theme 8ca7fe2 057/110: Add support for SPELL-FU, (continued)
- [elpa] externals/modus-vivendi-theme 8ca7fe2 057/110: Add support for SPELL-FU, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 17c760f 065/110: Internal: refine function for conditional 3D box, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme efdb292 062/110: Minor tweak to 3D modeline foreground, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme bd57c10 073/110: Clarify toggling of customisations in README, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme b874c79 058/110: NEW CUSTOM OPTION: 3d modeline for active window, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 9481730 076/110: New palette subset of nuanced accented backgrounds, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 5f8c9d5 078/110: Update README: improve discovery of custom options, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme bba4e77 045/110: Add support for IFLIPB, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 4e88341 051/110: Refine WRITEGOOD-MODE: use new lang colours, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 657adea 053/110: Draw a subtle border around the inactive modeline, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 8336e5a 061/110: Refine 3D modeline conditionality and tweak looks,
Stefan Monnier <=
- [elpa] externals/modus-vivendi-theme 7afc624 063/110: Improve README, especially docs on custom options, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme b5dba7a 081/110: Internal: use defun for conditional Org src blocks, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 0344a1b 101/110: Add support for MAN and WOMAN, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 37309fb 094/110: Internal: tweak Modus Vivendi "red-active" value, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 3d153f3 098/110: Add support for TUAREG, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme ead95c9 106/110: Use bespoke colour for contextually unfocused text, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 1742916 086/110: Internal: delete trailing whitespace, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 52a247a 087/110: Expand README with table of contents and more docs, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 44f75d3 107/110: Internal: refine Modus Operandi main green values, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 29078bd 109/110: Upgrade to version 0.8.0, Stefan Monnier, 2020/04/29