From 3e231674efdd801c346e34fea69d2e9500140cc6 Mon Sep 17 00:00:00 2001 From: Oleg Kosmakov <1533952+kosmakoff@users.noreply.github.com> Date: Fri, 4 Dec 2026 20:15:42 +0100 Subject: [PATCH] fix: replace drop-shadow effects with BoxShadow to stop full-window redraws An `Effect` renders its visual and all descendants into an offscreen layer and re-applies the blur filter over the whole layer. Because the custom window frame put `drop-shadow` on the Grid wrapping the entire window content, any change inside the window (e.g. hovering a row in the commit history) invalidated the whole window and re-blurred it every frame, making row highlight visibly lag behind the mouse. The dirty-rects debug overlay shows the entire window flashing on every mouse move. Move every shadow onto the Border that paints the background as a `BoxShadow` with the same offset, blur and color. A BoxShadow is part of that Border's own drawing, so changes in its children only dirty their own bounds. The hunk action bar uses a scoped style to set BoxShadow on each flat button's PART_Border since a StackPanel has no BoxShadow. See also AvaloniaUI/Avalonia#18358 for the same effect-on-parent issue. Co-Authored-By: Claude Opus 5.5 --- src/Resources/Styles.axaml | 24 +++++++++++------------ src/Views/About.axaml | 3 +-- src/Views/CommitMessageToolBox.axaml | 4 ++-- src/Views/CommitSearchView.axaml | 4 ++-- src/Views/Histories.axaml | 3 +-- src/Views/ImageDiffView.axaml | 20 +++++++++---------- src/Views/Launcher.axaml | 4 ++-- src/Views/LauncherPage.axaml | 7 +++---- src/Views/MergeConflictEditor.axaml | 3 +-- src/Views/Repository.axaml | 4 ++-- src/Views/RevisionFileContentViewer.axaml | 4 ++-- src/Views/RevisionFiles.axaml | 4 ++-- src/Views/SSHKeyHelper.axaml | 5 ++--- src/Views/SelfUpdate.axaml | 2 +- src/Views/Statistics.axaml | 3 +-- src/Views/TextDiffView.axaml | 8 +++++++- 16 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index d1ba76c821..ba94565e46 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -128,8 +128,8 @@ Cursor="BottomRightCorner" Tag="{x:Static WindowEdge.SouthEast}"/> - - + - - + - - + - - + - - + - - + - diff --git a/src/Views/CommitMessageToolBox.axaml b/src/Views/CommitMessageToolBox.axaml index d5f4b3de66..537243822e 100644 --- a/src/Views/CommitMessageToolBox.axaml +++ b/src/Views/CommitMessageToolBox.axaml @@ -42,8 +42,8 @@ - - + diff --git a/src/Views/CommitSearchView.axaml b/src/Views/CommitSearchView.axaml index 37ff9d42fe..5bae4ffb34 100644 --- a/src/Views/CommitSearchView.axaml +++ b/src/Views/CommitSearchView.axaml @@ -84,8 +84,8 @@ - - + diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index a3d24529fd..3c7ea2f8d8 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -284,12 +284,11 @@ ClipToBounds="True" Loaded="OnCommitGraphLoaded"/> - - - + + @@ -51,8 +51,8 @@ - - + + @@ -84,8 +84,8 @@ - - + + - - + + - - + + - - + diff --git a/src/Views/LauncherPage.axaml b/src/Views/LauncherPage.axaml index 08107bfa90..c65b5e80ec 100644 --- a/src/Views/LauncherPage.axaml +++ b/src/Views/LauncherPage.axaml @@ -83,9 +83,8 @@ - @@ -184,8 +183,8 @@ - - + + diff --git a/src/Views/MergeConflictEditor.axaml b/src/Views/MergeConflictEditor.axaml index 21958b25b6..0c2de3e9b0 100644 --- a/src/Views/MergeConflictEditor.axaml +++ b/src/Views/MergeConflictEditor.axaml @@ -317,13 +317,12 @@ - diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index 26aede9459..6523514d62 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -865,8 +865,8 @@ - - + + - - + + diff --git a/src/Views/RevisionFiles.axaml b/src/Views/RevisionFiles.axaml index ad2b02e06d..37ad8ecb63 100644 --- a/src/Views/RevisionFiles.axaml +++ b/src/Views/RevisionFiles.axaml @@ -54,8 +54,8 @@ - - + diff --git a/src/Views/SSHKeyHelper.axaml b/src/Views/SSHKeyHelper.axaml index 53d462c8d1..cd94649f5c 100644 --- a/src/Views/SSHKeyHelper.axaml +++ b/src/Views/SSHKeyHelper.axaml @@ -158,9 +158,8 @@ - + diff --git a/src/Views/SelfUpdate.axaml b/src/Views/SelfUpdate.axaml index 11296314fa..aa3c4e3f2a 100644 --- a/src/Views/SelfUpdate.axaml +++ b/src/Views/SelfUpdate.axaml @@ -46,7 +46,7 @@ - + diff --git a/src/Views/Statistics.axaml b/src/Views/Statistics.axaml index 2ebd6b9b37..2aa6171254 100644 --- a/src/Views/Statistics.axaml +++ b/src/Views/Statistics.axaml @@ -240,10 +240,9 @@ ClipToBounds="False"> - diff --git a/src/Views/TextDiffView.axaml b/src/Views/TextDiffView.axaml index af05899df6..74c1bad068 100644 --- a/src/Views/TextDiffView.axaml +++ b/src/Views/TextDiffView.axaml @@ -114,7 +114,13 @@ - + + + + +