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

[Laucher] Added border on W10 #36392

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

mantaionut
Copy link
Contributor

@mantaionut mantaionut commented Dec 17, 2024

Summary of the Pull Request

Added a border on W10 since only W11 had it.
Screenshots of the new look in W10.

dark light

PR Checklist

Detailed Description of the Pull Request / Additional comments

ResizeMode="NoResize" removes the border which on W11 was added back by enabling round corners

 
if (OSVersionHelper.IsWindows11())
{
   WindowInteropHelper(GetWindow(this)).EnsureHandle(); 
   DWMWINDOWATTRIBUTE attribute = DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE; 
   DWM_WINDOW_CORNER_PREFERENCE preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUND;  
   DwmSetWindowAttribute(hWnd, attribute, ref preference, sizeof(uint)); 
}  

Added a gray border on W10.

Validation Steps Performed

Tested On W10 and W11 on dark,light and all high contrast modes.

@jaimecbernardo jaimecbernardo added the Hot Fix Items we will product an out-of-band release for label Dec 17, 2024
@jaimecbernardo
Copy link
Collaborator

This is best reviewed hiding whitespace chances in the diff. Main reason is that diff is showing badly the identation changes in the XAML file from adding the Border tag.

Copy link
Collaborator

@davidegiacometti davidegiacometti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working great! Thanks for the quick fix!
I left a minor suggestion: dynamic resource will play well with high contrast themes and also support color change without restarting the app.

image

src/modules/launcher/PowerLauncher/MainWindow.xaml Outdated Show resolved Hide resolved
mantaionut and others added 2 commits December 18, 2024 10:19
Co-authored-by: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com>
Co-authored-by: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com>
Copy link
Collaborator

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you

@jaimecbernardo jaimecbernardo merged commit 6f23fb5 into microsoft:main Dec 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hot Fix Items we will product an out-of-band release for
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants