-
-
Notifications
You must be signed in to change notification settings - Fork 895
Add setting border color + fix background extending inside FluentWindow #1508
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
base: main
Are you sure you want to change the base?
Conversation
dwAttribute = Dwmapi.DWMWINDOWATTRIBUTE.DMWA_USE_IMMERSIVE_DARK_MODE_OLD; | ||
} | ||
|
||
// TODO: Validate HRESULT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also corrected this, it's only returning 0 on success.
It's actually SystemAccent used by Windows.
Border is now only active when focused (same as WinUI). When deactivated it gets back to default OS color. |
This also fixes FluentWindow background with None backdrop extending into window. Taken from #1505. |
{ | ||
CaptionHeight = 0, | ||
CornerRadius = default, | ||
GlassFrameThickness = WindowBackdropType == WindowBackdropType.None ? new Thickness(0.00001) : new Thickness(-1), // 0.00001 so there's no glass frame drawn around the window, but the border is still drawn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the fix for FluentWindow. -1 cannot be used if None is specified, otherwise the background of the window is rendered 1 pixel inside, which is obviously wrong.
{ | ||
try | ||
{ | ||
if (Utilities.IsCompositionEnabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addresses: COMException: {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (Exception from HRESULT: 0x80263001)
.
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Currently, WPF-UI doesn't set the border color based on accent. This adds that.
Old left, right new.