-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Inconsistent size of title header #3
Comments
Not your main issue, but you will want to customize The issue still shouldn't happen to begin with, but let me know how that goes. If it doesn't work immediately, you can look inside |
I tried customizing I noticed Every time I inspect But hard to debug, since I am not sure how to investigate what faces apply. |
I tried to get any effect and it seems that |
I meant (overlay-properties dslide--header-overlay)
;; (before-string
;; #("
;; Domain Specific sLIDEs
;; 2024-06-26 Positron <[email protected]>
;; Start 🢒 Controls
;; " 0 1
;; (line-height 0.5 face org-document-info)
;; 1 23
;; (face org-document-title)
;; 23 24
;; (line-height 0.5 face org-document-info)
;; 24 77
;; (face org-document-info)
;; 77 82
;; (wrap-prefix " " face
;; ((:inherit org-level-8)
;; org-level-1)
;; fontified t)
;; 82 85
;; (wrap-prefix " " face
;; ((:inherit org-level-8)
;; org-level-1)
;; fontified t)
;; 85 93
;; (wrap-prefix " " face
;; ((:inherit org-level-8)
;; org-level-2)
;; jinx--pending t fontified t)
;; 93 94
;; (line-height 1.5 face org-document-info)))
You can see the I'm pretty sure I saw this during development, and the issue was fixed by setting the breadcrumb face, but I have org level 8 defined in my theme:
Before I set this, I saw something similar as you. Now I want to make it work out of the box for everyone. I'll look into this more tomorrow. I definitely want a better solution. |
Correct, you can use either a face name or just a face property list. I think it can be a defface, but the key was to ensure it shadows the height of the other faces if you want consistent breadcrumb height. This shouldn't affect the title at all. That's my curiosity. |
I have basically the same overlay as you:
I notice that I have I do have all faces defined, also use relative font sizes for org-document-title, org-level-1, org-level-2, org-level-8, etc.
As mentioned changing what is inside |
The size/scale seems to go down with org-level, so seems it is inherited for the whole thing somehow? Also I can see it start slanting when reaching some levels, while the top level org-levels don't have this. |
I concur. Something about the current header is affecting the https://github.com/positron-solutions/dslide/blob/master/dslide.el#L2230-L2278 This might be an Emacs display bug. I'll try to fix / workaround and also mention this in the mailing list. What's your Emacs version? Thanks for pulling your |
I am using Emacs from main branch, specifically this commit (8198a144376cfea3490ea5628392fb3a49fec2d6) If I can assist in any other way, let me know. I guess it could be a bug after all, because it is very confusing. |
I ran into this issue as well, so I decided to do a little digging. I am also using relative sizes for my header and title faces ( I'm not sure if this is correct, but my hunch is that overlays inherit the face properties of the text "underneath" them. Since the first text in the buffer is the current headline, that means that the overlay text inherits the properties of the current headline's face. Thus, if I was able to workaround this by changing the text in the overlay to also inherit from the (overlay-put
dslide--header-overlay 'before-string
(concat (dslide--margin-lines dslide-margin-title-above)
- (propertize title 'face 'org-document-title)
+ (propertize title 'face '(org-document-title default))
(dslide--margin-lines dslide-margin-title-below)
(when (and dslide-header-date date) For (defun dslide--info-face (s)
- (propertize s 'face 'org-document-info))
+ (propertize s 'face '(org-document-info default))) This is all assumptions, probably needs a bit more scrutiny 😅. |
Perhaps adding a new face so users can control it. I am not sure I would like to use the same face as the |
Perhaps it'd be worthwhile to mirror all the faces; e.g |
I agree with the mechanism. The first headline face is definitely coupling with the display of the header contents. I tried using the identical (overlay-put
dslide--header-overlay 'before-string
#("
Domain Specific sLIDEs
2024-07-02 Positron <[email protected]>
Start 🢒 Controls
"
0 1 (line-height 0.5 face org-document-info) 1 23 (face org-document-title) 23 24
(line-height 0.5 face org-document-info) 24 77 (face org-document-info) 77 82
(wrap-prefix #(" " 0 2 (face org-level-1)) face ((:inherit org-level-8) org-level-1)
fontified t)
82 85
(wrap-prefix #(" " 0 2 (face org-level-1)) face ((:inherit org-level-8) org-level-1)
fontified t)
85 93
(wrap-prefix #(" " 0 3 (face org-level-2)) face ((:inherit org-level-8) org-level-2)
fontified t)
93 94 (line-height 1.5 face org-document-info))) I can't reproduce the display by just manually setting the same overlay string. This points to my org heading faces or other config settings. I removed this hunk from the unstable branch because it was dead. It may have been alive at one point. I recall having a variation of the problem in this issue, but that I never saw it again after setting the face on breadcrumbs.
Let me know how the branch works out and we can go from there. |
I added a new option to completely override the header function. This can be better for some people than figuring out all the customize variables. Here's a minimal example:
Fortunately, this quick test, without setting the faces, revealed that indeed the current heading face will apply to the |
Can confirm that this seems to fix the issue for me 🎉 |
Boom. Free to reopen if not everyone has success. Thanks for bringing up the issue. |
The size of the title header keeps changing depending on which subheading is displayed (I'm using relative font sizes, so perhaps that is why).

The text was updated successfully, but these errors were encountered: