mirror of
https://github.com/jimeh/tab-bar-notch.git
synced 2026-02-19 01:26:39 +00:00
fix(setup): correctly re-setup tab-bar-notch if needed
This allows changes to the tab-bar-notch--face-name frame parameter to be handled correctly, and the relevat face created if needed. Should resolve issues with session managers which may restore all frame parameters.
This commit is contained in:
@@ -197,15 +197,17 @@ The assigned face name for each frame is stored in a frame
|
||||
parameter."
|
||||
(let* ((frame (or frame (selected-frame)))
|
||||
(face-name (frame-parameter frame 'tab-bar-notch--face-name)))
|
||||
(if face-name
|
||||
face-name
|
||||
(when (not face-name)
|
||||
(setq face-name (intern (format "tab-bar-notch--face-%d"
|
||||
tab-bar-notch--next-face-id))
|
||||
tab-bar-notch--next-face-id (1+ tab-bar-notch--next-face-id))
|
||||
tab-bar-notch--next-face-id (1+ tab-bar-notch--next-face-id)))
|
||||
|
||||
(when (not (facep face-name))
|
||||
(make-face face-name)
|
||||
(set-face-attribute face-name nil :height 1.0)
|
||||
(set-frame-parameter frame 'tab-bar-notch--face-name face-name)
|
||||
face-name)))
|
||||
(set-frame-parameter frame 'tab-bar-notch--face-name face-name))
|
||||
|
||||
face-name))
|
||||
|
||||
(defun tab-bar-notch--notch-height (width height)
|
||||
"Return the notch height for the given screen WIDTH and HEIGHT.
|
||||
|
||||
Reference in New Issue
Block a user