-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fontaine causes mode-line to lose styling #15
Comments
From: Emily Hyland ***@***.***>
Date: Fri, 24 Jan 2025 18:34:00 -0800
Since the change to using a custom theme for fontaine's
implementation, I'm running into an issue with styling of the mode
line. I'm using Emacs 30, but the issue appears to affect 29 as well.
[... 26 lines elided]
Thank you! It seems we have general issue with faces that are empty. I
think we need to avoid setting those altogether otherwise we get the
behaviour you describe.
Let me give it a try.
…--
Protesilaos Stavrou
https://protesilaos.com
|
From: Protesilaos Stavrou ***@***.***>
Date: Sat, 25 Jan 2025 12:18:04 +0200
> From: Emily Hyland ***@***.***>
> Date: Fri, 24 Jan 2025 18:34:00 -0800
>
> Since the change to using a custom theme for fontaine's
> implementation, I'm running into an issue with styling of the mode
> line. I'm using Emacs 30, but the issue appears to affect 29 as well.
>
> [... 26 lines elided]
Thank you! It seems we have general issue with faces that are empty. I
think we need to avoid setting those altogether otherwise we get the
behaviour you describe.
Let me give it a try.
I tried with the following diff. It only styles the face if at least one
attribute of it is covered. I think this more faithful to the intent of
this package. But the problem you reported persists, which I find
surprising. I was expecting the themes to blend with each instead of one
overriding the other in some cases.
I think this is a general Emacs bug though, as Fontaine is not doing
anything fancy here. I will try to reproduce this problem with two
generic deftheme objects. Then I will report it to the Emacs maintainers
and see what we get.
fontaine.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/fontaine.el b/fontaine.el
index 0366ae2..93572c6 100644
--- a/fontaine.el
+++ b/fontaine.el
@@ -385,13 +385,14 @@ (defun fontaine--get-face-spec (preset face)
(slant (fontaine--get-property face "slant" properties))
(height (fontaine--get-property face "height" properties))
(width (fontaine--get-property face "width" properties)))
- `(,face
- ((((type graphic))
- ,@(when family (list :family family))
- ,@(when weight (list :weight weight))
- ,@(when slant (list :slant slant))
- ,@(when height (list :height height))
- ,@(when width (list :width width)))))))
+ (when (or family weight slant height width)
+ `(,face
+ ((((type graphic))
+ ,@(when family (list :family family))
+ ,@(when weight (list :weight weight))
+ ,@(when slant (list :slant slant))
+ ,@(when height (list :height height))
+ ,@(when width (list :width width))))))))
(defun fontaine--set-faces (preset)
"Set all `fontaine-faces' according to PRESET."
…--
Protesilaos Stavrou
https://protesilaos.com
|
protesilaos
added a commit
that referenced
this issue
Jan 25, 2025
This is in response to a bug reported by Emily Hyland in issue 15: <#15>. The change I am making does not fix the problem, but still seems like the right thing to do in general.
Thank you so much for the quick fix! I updated this morning, and it everything seems to be working great! |
From: Emily Hyland ***@***.***>
Date: Mon, 27 Jan 2025 09:50:12 -0800
Thank you so much for the quick fix! I updated this morning, and it
everything seems to be working great!
Oh, so you mean that you can no longer reproduce the bug? I have not had
the chance to test it again since our last exchange, but I recall it was
still giving me issues.
Please check if everything looks fine on your end and I will do the
same.
Thanks again!
…--
Protesilaos Stavrou
https://protesilaos.com
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since the change to using a custom theme for fontaine's implementation, I'm running into an issue with styling of the mode line. I'm using Emacs 30, but the issue appears to affect 29 as well.
By default, the
mode-line-active
face inherits frommode-line
and that's the only styling it receives. That's also true in a lot of themes, since the face was only introduced in 29. Once that face is touched by a custom theme, the default styling is removed and only the styling from the theme is applied, meaning that the active mode-line loses all styling as soon as a fontaine preset is applied.This doesn't affect the modus or ef themes, since they style
mode-line-active
explicitly, but for any theme that doesn't (or when no theme is applied) the mode-line becomes basically invisible. The mode-line is the most noticeable thing, and the one that often persists after setting a theme, but the same issue appears to affect other faces -- I noticed it online-number
as well.No theme, before loading fontaine:
After loading fontaine:
The text was updated successfully, but these errors were encountered: