CTRL+Shift+Scroll should enable acrylic if it's not on already #939

Closed
opened 2026-01-30 22:11:59 +00:00 by claunia · 11 comments
Owner

Originally created by @Tuumke on GitHub (May 10, 2019).

When useAcrylic is turned off, ctrl+shift+scroll doesn't enable it. This stops people from adjusting their transparencies.

original text

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.18362.86]
  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)
    CTRL+Shift+Scroll in cmd.exe works fine with transparency/blurring
    CTRL+Shift+Scrol in Powershell.exe doesnt do a thing
  • What's wrong / what should be happening instead:
    I was under the impression that it would work the same als the cmd.exe.
Originally created by @Tuumke on GitHub (May 10, 2019). When `useAcrylic` is turned off, ctrl+shift+scroll doesn't enable it. This stops people from adjusting their transparencies. ### original text > * Your Windows build number: (Type `ver` at a Windows Command Prompt) Microsoft Windows [Version 10.0.18362.86] > * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) > CTRL+Shift+Scroll in cmd.exe works fine with transparency/blurring > CTRL+Shift+Scrol in Powershell.exe doesnt do a thing > * What's wrong / what should be happening instead: > I was under the impression that it would work the same als the cmd.exe.
Author
Owner

@ghvanderweg commented on GitHub (May 10, 2019):

is "useAcrylic" set to "true" in the profile for PowerShell (in %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json)?

@ghvanderweg commented on GitHub (May 10, 2019): is "useAcrylic" set to "true" in the profile for PowerShell (in %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json)?
Author
Owner

@Tuumke commented on GitHub (May 10, 2019):

is "useAcrylic" set to "true" in the profile for PowerShell (in %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json)?

No it wasn't! Thanks so much. Love it so far! :)

@Tuumke commented on GitHub (May 10, 2019): > is "useAcrylic" set to "true" in the profile for PowerShell (in %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json)? No it wasn't! Thanks so much. Love it so far! :)
Author
Owner

@zadjii-msft commented on GitHub (May 10, 2019):

Hmm. This is a good suggestion - if we're not using an acrylic background, the mouse wheel could change it into one.

This is possibly something that wouldn't be too hard for someone to dip their toes into the codebase with. Take a look at the code in TermControl::_MouseTransparencyHandler. The trick is, for the case where we're not using acrylic in the settings, we'd need to set a new flag internally in the TermControl to indicate we've switched to acrylic mode.

@zadjii-msft commented on GitHub (May 10, 2019): Hmm. This is a good suggestion - if we're not using an acrylic background, the mouse wheel could change it into one. This is possibly something that wouldn't be _too_ hard for someone to dip their toes into the codebase with. Take a look at the code in `TermControl::_MouseTransparencyHandler`. The trick is, for the case where we're not using acrylic in the settings, we'd need to set a new flag internally in the TermControl to indicate we've switched to acrylic mode.
Author
Owner

@dkter commented on GitHub (May 10, 2019):

I might be able to try this.

Per #593 acrylic is disabled on inactive windows, but should it be possible to enable transparency without the acrylic on inactive windows to make the difference less jarring?

@dkter commented on GitHub (May 10, 2019): I might be able to try this. Per #593 acrylic is disabled on inactive windows, but should it be possible to enable transparency without the acrylic on inactive windows to make the difference less jarring?
Author
Owner

@zadjii-msft commented on GitHub (May 10, 2019):

See, we don't even know if there's a way to get non-acrylic transparency. If you could research that, that'd be even more appreciated. I'd think for the time being though, acrylic-backed transparency should be fine

@zadjii-msft commented on GitHub (May 10, 2019): See, we don't even know if there's a way to get non-acrylic transparency. If you could research that, that'd be even more appreciated. I'd think for the time being though, acrylic-backed transparency should be fine
Author
Owner

@dkter commented on GitHub (May 10, 2019):

Yeah, at the moment it seems like the only way to get native transparency is through acrylic. Oh well. Consistency, I guess.

@dkter commented on GitHub (May 10, 2019): Yeah, at the moment it seems like the only way to get native transparency is through acrylic. Oh well. Consistency, I guess.
Author
Owner

@PhMajerus commented on GitHub (May 11, 2019):

I knew my Win32 GDI skills could still be useful 😄

The Win32 way to achieve transparency and alpha blending is through layered windows (Win2K and later if I remember correctly):
https://docs.microsoft.com/en-us/windows/desktop/winmsg/window-features#layered-windows

Try this for example:

LONG lExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
lExStyle |= WS_EX_LAYERED;
SetWindowLong(hWnd, GWL_EXSTYLE, lExStyle);
SetLayeredWindowAttributes(hWnd, RGB(0, 0, 0), 192, LWA_ALPHA);

I wouldn't recommend it for anything else than a very slight transparency though, since without the ability to blur the background, it would make the console harder to read.

@PhMajerus commented on GitHub (May 11, 2019): I knew my Win32 GDI skills could still be useful 😄 The Win32 way to achieve transparency and alpha blending is through layered windows (Win2K and later if I remember correctly): https://docs.microsoft.com/en-us/windows/desktop/winmsg/window-features#layered-windows Try this for example: ``` LONG lExStyle = GetWindowLong(hWnd, GWL_EXSTYLE); lExStyle |= WS_EX_LAYERED; SetWindowLong(hWnd, GWL_EXSTYLE, lExStyle); SetLayeredWindowAttributes(hWnd, RGB(0, 0, 0), 192, LWA_ALPHA); ``` I wouldn't recommend it for anything else than a very slight transparency though, since without the ability to blur the background, it would make the console harder to read.
Author
Owner

@FoxInFlame commented on GitHub (May 12, 2019):

I wouldn't recommend it for anything else than a very slight transparency though, since without the ability to blur the background, it would make the console harder to read.

Although, this is what has been done in previous CMDs until now afaik. I remember the window being quite hard to read when I lowered the opacity thinking it would blur the background and it didn't.

@FoxInFlame commented on GitHub (May 12, 2019): > I wouldn't recommend it for anything else than a very slight transparency though, since without the ability to blur the background, it would make the console harder to read. Although, this is what has been done in previous CMDs until now afaik. I remember the window being quite hard to read when I lowered the opacity thinking it would blur the background and it didn't.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 11, 2019):

I think this is a duplicate of #603, actually.

@DHowett-MSFT commented on GitHub (Jun 11, 2019): I think this is a duplicate of #603, actually.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 11, 2019):

Oh, I see. Okay. I'll repurpose this.

@DHowett-MSFT commented on GitHub (Jun 11, 2019): Oh, I see. Okay. I'll repurpose this.
Author
Owner

@Summon528 commented on GitHub (Jun 14, 2019):

I was playing around with this and was trying to switch the background to an acrylic brush on scroll. However, this makes me wonder why do we even need a useAcrylic option or a solid background brush since setting acrylicOpacity: 1 has the exact effect as useAcrylic: false

@Summon528 commented on GitHub (Jun 14, 2019): I was playing around with this and was trying to switch the background to an acrylic brush on scroll. However, this makes me wonder why do we even need a `useAcrylic` option or a solid background brush since setting `acrylicOpacity: 1` has the exact effect as `useAcrylic: false`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#939