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

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

Closed
Tuumke opened this issue May 10, 2019 · 11 comments · Fixed by #4853
Closed

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

Tuumke opened this issue May 10, 2019 · 11 comments · Fixed by #4853
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@Tuumke
Copy link

Tuumke commented 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.
@ghvanderweg
Copy link

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

@Tuumke
Copy link
Author

Tuumke commented 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! :)

@zadjii-msft
Copy link
Member

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 zadjii-msft changed the title Transparency powershell CTRL+Shift+Scroll should change transparency even if arylic isn't enabled for the profile May 10, 2019
@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. labels May 10, 2019
@zadjii-msft zadjii-msft added this to the Windows Terminal v1.0 milestone May 10, 2019
@dkter
Copy link
Contributor

dkter commented 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?

@zadjii-msft
Copy link
Member

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

@dkter
Copy link
Contributor

dkter commented 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.

@PhMajerus
Copy link

PhMajerus commented 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.

@FoxInFlame
Copy link

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.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Product-Terminal The new Windows Terminal. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. labels May 17, 2019
@DHowett-MSFT
Copy link
Contributor

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

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jun 11, 2019
@DHowett-MSFT
Copy link
Contributor

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

@DHowett-MSFT DHowett-MSFT reopened this Jun 11, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 11, 2019
@DHowett-MSFT DHowett-MSFT changed the title CTRL+Shift+Scroll should change transparency even if arylic isn't enabled for the profile CTRL+Shift+Scroll should enable acrylic if it's not on already Jun 11, 2019
@DHowett-MSFT DHowett-MSFT added Issue-Task It's a feature request, but it doesn't really need a major design. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jun 11, 2019
@Summon528
Copy link
Contributor

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

@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Issue-Task It's a feature request, but it doesn't really need a major design. labels Nov 18, 2019
@zadjii-msft zadjii-msft added the Priority-3 A description (P3) label Jan 22, 2020
@ghost ghost added the In-PR This issue has a related PR label Mar 9, 2020
DHowett-MSFT pushed a commit that referenced this issue Mar 11, 2020
If UseAcrylic is disabled, CTRL+SHIFT+SCROLL would enable it, without
having to change the setting in profile.json manually.

1. Set "useAcrylic" to false for the any profile in profile.json
2. Open terminal window for that profile.
3. CTRL+SHIFT+MouseScroll
   Acrylic background opacity should change according to mouse scroll

## PR Checklist
* [x] CLA signed.
* [x] Tested manually
* [x] Updated documentation

Closes #661
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR labels Mar 11, 2020
abhijeetviswam added a commit to abhijeetviswam/terminal that referenced this issue Mar 12, 2020
If UseAcrylic is disabled, CTRL+SHIFT+SCROLL would enable it, without
having to change the setting in profile.json manually.

1. Set "useAcrylic" to false for the any profile in profile.json
2. Open terminal window for that profile.
3. CTRL+SHIFT+MouseScroll
   Acrylic background opacity should change according to mouse scroll

## PR Checklist
* [x] CLA signed.
* [x] Tested manually
* [x] Updated documentation

Closes microsoft#661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants