From af1866ef15185ad795bbb33ea8664e5ea0989222 Mon Sep 17 00:00:00 2001 From: obesity40 <253336873+obesity40@users.noreply.github.com> Date: Thu, 1 Oct 2026 12:01:32 +0800 Subject: [PATCH] fix(ocr): show language dropdown scrollbar and theme its thumb The language pickers in the text capture window had no visible scrollbar, so a long language list could not be scrolled at all. The ScrollBar style was declared on TextBox.Resources, which never reaches the ScrollViewer inside PART_ContentHost; move it to ScrollViewer.Resources and give the thumb a theme-derived color with a brighter hover state. --- src/OddSnap/Presentation/Theme.cs | 5 + src/OddSnap/UI/OcrResultWindow.xaml | 231 ++++++++++++++++++++++--- src/OddSnap/UI/OcrResultWindow.xaml.cs | 2 + 3 files changed, 217 insertions(+), 21 deletions(-) diff --git a/src/OddSnap/Presentation/Theme.cs b/src/OddSnap/Presentation/Theme.cs index 91810c90..66c6a6d1 100644 --- a/src/OddSnap/Presentation/Theme.cs +++ b/src/OddSnap/Presentation/Theme.cs @@ -91,6 +91,11 @@ public static class Theme public static Color SettingsWindowBorder => IsDark ? CA(255, 255, 255, 30) : CA(0, 0, 0, 22); public static Color SettingsSeparator => IsDark ? CA(255, 255, 255, 20) : CA(0, 0, 0, 18); + // Scrollbar thumb palette. Kept subtle so thin scrollbars do not draw + // attention, with a brighter hover/drag state for affordance. + public static Color ScrollThumb => IsDark ? CA(255, 255, 255, 70) : CA(0, 0, 0, 60); + public static Color ScrollThumbHover => IsDark ? CA(255, 255, 255, 120) : CA(0, 0, 0, 100); + public static SolidColorBrush Brush(Color c) { var b = new SolidColorBrush(c); b.Freeze(); return b; } public static void ApplyTo(System.Windows.ResourceDictionary resources) diff --git a/src/OddSnap/UI/OcrResultWindow.xaml b/src/OddSnap/UI/OcrResultWindow.xaml index 3a9cc28a..df2dce83 100644 --- a/src/OddSnap/UI/OcrResultWindow.xaml +++ b/src/OddSnap/UI/OcrResultWindow.xaml @@ -24,32 +24,50 @@ + + + +