From 7a151a688b66ddc74e93ddda8d6482ea709accc6 Mon Sep 17 00:00:00 2001 From: chinboy Date: Mon, 15 Dec 2025 22:52:56 +0800 Subject: [PATCH] Fix Window Content CornerRadius bug --- build/Version.props | 4 +- .../ImagePreviewer/ImagePreviewerDialog.cs | 5 +- .../Themes/ImagePreviewerDialogTheme.axaml | 5 +- .../TabControl/CardTabControl.cs | 5 +- .../TabControl/Themes/CardTabItemTheme.axaml | 58 ++++++++----------- .../Window/Themes/WindowTheme.axaml | 2 +- .../Window/Themes/WindowTheme.cs | 5 ++ 7 files changed, 39 insertions(+), 45 deletions(-) diff --git a/build/Version.props b/build/Version.props index dee77a29e..eae303079 100644 --- a/build/Version.props +++ b/build/Version.props @@ -2,7 +2,7 @@ $(NoWarn);CS7035 11.3.9 - 5.1.3-build.2 - 5.1.3-build.2 + 5.1.3-build.3 + 5.1.3-build.3 \ No newline at end of file diff --git a/src/AtomUI.Desktop.Controls/ImagePreviewer/ImagePreviewerDialog.cs b/src/AtomUI.Desktop.Controls/ImagePreviewer/ImagePreviewerDialog.cs index 1cb0a256d..e899daff0 100644 --- a/src/AtomUI.Desktop.Controls/ImagePreviewer/ImagePreviewerDialog.cs +++ b/src/AtomUI.Desktop.Controls/ImagePreviewer/ImagePreviewerDialog.cs @@ -542,12 +542,11 @@ internal class ImagePreviewerDialog : Window, const double ratio = 0.70d; var height = ClientAreaScreenGeometry.Height * ratio; var width = ClientAreaScreenGeometry.Width * ratio; - Width = width; - Height = height; + ClientSize = new Size(width, height); _firstSizeCalculated = true; return new Size(width, height); } - return new Size(Width, Height); + return ClientSize; } private void HandleHorizontalFlipRequest() diff --git a/src/AtomUI.Desktop.Controls/ImagePreviewer/Themes/ImagePreviewerDialogTheme.axaml b/src/AtomUI.Desktop.Controls/ImagePreviewer/Themes/ImagePreviewerDialogTheme.axaml index a472a45f0..58fec488e 100644 --- a/src/AtomUI.Desktop.Controls/ImagePreviewer/Themes/ImagePreviewerDialogTheme.axaml +++ b/src/AtomUI.Desktop.Controls/ImagePreviewer/Themes/ImagePreviewerDialogTheme.axaml @@ -2,7 +2,10 @@ xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:atom="https://atomui.net" + xmlns:converters="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls" x:ClassModifier="internal"> + @@ -42,7 +45,7 @@ - - - - - - - + + + + + + + + + + - - - - - - -