tweak(lib): add alpha-background support to opacity setter
This is preferred when available because it does not affect foreground content like text and images. Ref: https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29.1#n801
This commit is contained in:
parent
d5f86f179f
commit
088bd387f6
1 changed files with 6 additions and 2 deletions
|
@ -177,9 +177,13 @@ Use `winner-undo' to undo this. Alternatively, use
|
|||
OPACITY is an integer between 0 to 100, inclusive."
|
||||
(interactive
|
||||
(list (read-number "Opacity (0-100): "
|
||||
(or (frame-parameter nil 'alpha)
|
||||
(or (frame-parameter
|
||||
nil (if (> emacs-major-version 28)
|
||||
'alpha-background 'alpha))
|
||||
100))))
|
||||
(set-frame-parameter nil 'alpha opacity))
|
||||
(set-frame-parameter nil (if (> emacs-major-version 28)
|
||||
'alpha-background 'alpha)
|
||||
opacity))
|
||||
|
||||
(defvar doom--narrowed-base-buffer nil)
|
||||
;;;###autoload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue