Skip to content
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

Support for alpha-background for transparency? #376

Open
jasonmj opened this issue Mar 12, 2024 · 6 comments
Open

Support for alpha-background for transparency? #376

jasonmj opened this issue Mar 12, 2024 · 6 comments

Comments

@jasonmj
Copy link

jasonmj commented Mar 12, 2024

Perhaps I'm missing something, but it seems like setting frame parameter alpha-background do not produce the desired effect of applying transparency to the frame background. What I want to do is display a posframe with alpha-background set to 80%. I've had no trouble with this Emacs plus for macOS or standard Emacs for Linux, so I know my config is not the issue.

Edit: the frame parameter I need support for is alpha rather than alpha-background, see comments below.

@jasonmj jasonmj changed the title Support for alpha/transparency? Support for alpha-background for transparency? Mar 12, 2024
@brosasaki
Copy link

This port implements background transparency in the "mac way" (frosted glass look) by setting the :stipple attribute to "alpha:ALPHA" where alpha is between 0.0 and 1.0. Check the info pages linked in the "Mac" customization group.

More importantly, how are you getting alpha-background to work on Emacs plus? I've always been bothered by how I have to choose between alpha-background support and better window decoration management between the two, but it seems you have found a way?

@jasonmj
Copy link
Author

jasonmj commented Apr 16, 2024

how are you getting alpha-background to work on Emacs plus?

I'm sorry, I wasn't using the alpha-background frame parameter. It was just alpha. I checked my git history and saw that it was (alpha . 85) I had used as a frame parameter for my vertico posframe.

Testing now, I get transparency in Emacs Plus:
image

Unfortunately, the same is not true in Emacs Mac:
image

@jado4810
Copy link

Seems to work frame parameter like: (alpha . (100 85)).

I use below on my init.el:

(setq default-frame-alist
      (append '((background-color . "#f0f0f0")
		(cursor-color     . "#d00000")
		(height           . 40)
		(alpha            . (100 85)))
	      default-frame-alist))

@jasonmj
Copy link
Author

jasonmj commented May 22, 2024

Seems to work frame parameter like: (alpha . (100 85)).

I use below on my init.el:

(setq default-frame-alist
      (append '((background-color . "#f0f0f0")
		(cursor-color     . "#d00000")
		(height           . 40)
		(alpha            . (100 85)))
	      default-frame-alist))

I wish that worked for me, but it does not. Are you able to get the effect while using a posframe or something similar?

@jado4810
Copy link

Sorry I didn't understand your intent.

With that configuration, the transparency of the child posframe is the same as that of the parent frame.
Might have to set alpha for child popup frame, however I have not found a way so far.

@pnor
Copy link

pnor commented Sep 19, 2024

Hi, also regarding the alpha-background parameter, is there a way to disable the MacOS "frosted glass look" so it looks more inline with the Linux implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants