From 4df612dd7ae34efa26ba2c1a9a97d15c018e2cc5 Mon Sep 17 00:00:00 2001 From: Jatin K Malik Date: Wed, 23 Sep 2026 00:09:43 -0700 Subject: [PATCH] fix(settings): drop Test Dictation scrolled-window stripe (#853) * fix(settings): drop Test Dictation scrolled-window stripe GTK3 ScrolledWindow defaults to an IN etched shadow, which GNOME/Wayland renders as a thin vertical stripe on the left of the Test Dictation revealer even when the buffer is empty. Call set_shadow_type(NONE) to match the other ScrolledWindows in this dialog. Fixes #847 * Add missing test return annotation --- src/vocalinux/ui/settings_dialog.py | 2 ++ tests/test_settings_dialog.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/vocalinux/ui/settings_dialog.py b/src/vocalinux/ui/settings_dialog.py index a894b29..6f8b8c7 100644 --- a/src/vocalinux/ui/settings_dialog.py +++ b/src/vocalinux/ui/settings_dialog.py @@ -4055,6 +4055,8 @@ class SettingsDialog(Gtk.Dialog): scrolled_window.set_min_content_height(60) scrolled_window.set_max_content_height(100) scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + # GTK3 default IN shadow draws a left etched stripe on GNOME/Wayland (#847). + scrolled_window.set_shadow_type(Gtk.ShadowType.NONE) scrolled_window.get_style_context().add_class("test-area") self.test_textview = Gtk.TextView() diff --git a/tests/test_settings_dialog.py b/tests/test_settings_dialog.py index 7775a9a..84601be 100644 --- a/tests/test_settings_dialog.py +++ b/tests/test_settings_dialog.py @@ -1048,6 +1048,14 @@ class TestSettingsNavigation(unittest.TestCase): self.assertIn("Gtk.Separator", before_close) self.assertIn("footer.pack_start(close_separator", before_close) + def test_test_dictation_scrolled_window_has_no_shadow(self) -> None: + """GTK3 ScrolledWindow default shadow is a left stripe on GNOME/Wayland (#847).""" + footer_body = self.source_code.split("def _build_sidebar_footer")[1].split("\n def ")[0] + scrolled_block = footer_body.split("scrolled_window = Gtk.ScrolledWindow()")[1].split( + "self.test_textview = Gtk.TextView()" + )[0] + self.assertIn("scrolled_window.set_shadow_type(Gtk.ShadowType.NONE)", scrolled_block) + def test_sidebar_icons_use_adwaita_names(self): """Sidebar icons must resolve in the stock Adwaita theme.""" for icon in [