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

Rainbow Frame #12950

Closed
zadjii-msft opened this issue Apr 20, 2022 · 5 comments · Fixed by #15441
Closed

Rainbow Frame #12950

zadjii-msft opened this issue Apr 20, 2022 · 5 comments · Fixed by #15441
Labels
Area-Theming Anything related to the theming of elements of the window In-PR This issue has a related PR Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.

Comments

@zadjii-msft
Copy link
Member

zadjii-msft commented Apr 20, 2022

Posted here so that we don't totally forget about this.

rainbow-FRAME

dev/migrie/fhl/rgb-rainbow-window-frame. I've got it hooked up to moving the window, obviously, that's contrived, so a 1/60th second timer somewhere would work well enough.

I dunno what exactly this is, but we need it in the Terminal. Probably a special case of window.frameColor in #3327?

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. Area-Theming Anything related to the theming of elements of the window labels Apr 20, 2022
@zadjii-msft zadjii-msft added this to the Backlog milestone Apr 20, 2022
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 20, 2022
@Jayonics
Copy link

Important? 👎
Cool? 💯🌟🌈😲

@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 26, 2022
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label May 25, 2023
carlos-zamora pushed a commit that referenced this issue Jun 6, 2023
Add support for `$theme.window.frame`, `.unfocusedFrame`, and `.rainbowFrame`. The first two accept a `ThemeColor` to set the window frame, using [`DwmSetWindowAttribute`](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute) with [`DWMWA_BORDER_COLOR`](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute). `rainbowFrame` accepts a `bool`. When enabled, it'll cycle the color of the frame through all the hues, ala [this gif](https://user-images.githubusercontent.com/18356694/164307822-e4267965-2ce0-4294-8499-59c3ba7edbae.gif) (but, constantly, instead of just when the window moves). 

This only works on Windows 11.

## Validation Steps Performed
* Works on Windows 11
* Doesn't explode on Windows 10

## PR Checklist
- [x] Closes #12950
- See also #3327
- [x] Schema updated (if necessary)


### other details

There's probably some impact to perf with `rainbowFrame`. It's one `DispatcherTimer` per window. That could probably be optimized somehow to like, one per process, but meh?
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jun 6, 2023
@6H075T2
Copy link

6H075T2 commented Nov 28, 2023

how to do this?

@6H075T2
Copy link

6H075T2 commented Dec 3, 2023

image
It doesn't work for me can you enlighten me please?

@zadjii-msft
Copy link
Member Author

Ah, the rainbow frame setting isn't a global, it's a theme setting. You need to make a new theme, and enable it for the theme.

Try adding the following to the globals:

{
    // "profiles": { ... }
    // "schemes": [ ... ] 
    // "defaultProfile": ...
    // etc
    // etc
    
    "theme": "rainbow",
    "themes":
    [
        {
            "name": "rainbow",
            "window": 
            {
                "experimental.rainbowFrame": true,
            },
            "tab": {
                "background": "terminalBackground",
                "unfocusedBackground": "#00000000"
            },
        },
    ]
}

@zadjii-msft zadjii-msft modified the milestones: Backlog, Terminal v1.19 Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Theming Anything related to the theming of elements of the window In-PR This issue has a related PR Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants