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
This commit is contained in:
Jatin K Malik
2026-09-23 00:09:43 -07:00
committed by GitHub
parent 33492d7cb1
commit 4df612dd7a
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -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()
+8
View File
@@ -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 [