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

[Regression] Title color is different and "WinUI Desktop" title name is back for WinUI Package #18647

Open
ArchieCoder opened this issue Oct 31, 2024 · 5 comments
Assignees
Labels
area/windowing Categorizes an issue or PR as relevant to window management kind/bug Something isn't working

Comments

@ArchieCoder
Copy link
Contributor

Current behavior

Left side: WinUI Package
Right side: Skia Desktop

This is the first time that I see the black background in the title.

image

Expected behavior

It should output like Skia Desktop

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

No

Environment

No response

NuGet package version(s)

5.5.32

Affected platforms

Windows (WinAppSDK)

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

Similar issue #18586

cc @MartinZikmund

@ArchieCoder ArchieCoder added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Oct 31, 2024
@jeromelaban
Copy link
Member

Thanks for the report. Did you explicit set the color to black for the winappsdk version?

@jeromelaban jeromelaban added the triage/needs-information Indicates an issue needs more information in order to work on it. label Nov 4, 2024
@ArchieCoder
Copy link
Contributor Author

I have this in a newly created Fluent Desktop project.

image

@github-actions github-actions bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Nov 4, 2024
@ArchieCoder
Copy link
Contributor Author

When the app is run outside the debugger, the title color is like before 🙃

@MartinZikmund MartinZikmund self-assigned this Nov 6, 2024
@MartinZikmund MartinZikmund added area/windowing Categorizes an issue or PR as relevant to window management and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Nov 6, 2024
@ArchieCoder
Copy link
Contributor Author

For someone who wants a workaround, use the following code in App.xaml.cs before MainWindow.UseStudio()/MainWindow.SetWindowIcon();

#if WINDOWS
        MainWindow.Title = "Your app name";
        
        var titleBar = MainWindow.AppWindow.TitleBar;
        titleBar.BackgroundColor = Colors.White;
        titleBar.InactiveBackgroundColor = titleBar.BackgroundColor;
        titleBar.ForegroundColor = Colors.Black;
        titleBar.ButtonBackgroundColor = titleBar.BackgroundColor;
        titleBar.ButtonInactiveBackgroundColor = titleBar.BackgroundColor;
        titleBar.ButtonForegroundColor = titleBar.ForegroundColor;
        titleBar.ButtonInactiveForegroundColor = titleBar.ForegroundColor;
#endif

@ArchieCoder
Copy link
Contributor Author

@MartinZikmund When an app uses the multi-window feature, the title has the same title + color issue.

Also, the app icon is not set correctly.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windowing Categorizes an issue or PR as relevant to window management kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants