diff --git a/src/vocalinux/ui/settings_dialog.py b/src/vocalinux/ui/settings_dialog.py index b418d1e..f10b4a8 100644 --- a/src/vocalinux/ui/settings_dialog.py +++ b/src/vocalinux/ui/settings_dialog.py @@ -2918,6 +2918,15 @@ class SettingsDialog(Gtk.Dialog): footer.pack_start(self.test_output_revealer, False, False, 0) + # Separate Close from the dictation-test controls so it reads as + # dialog chrome, not as part of Test Dictation (#651). + close_separator = Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL) + close_separator.set_margin_start(8) + close_separator.set_margin_end(8) + close_separator.set_margin_top(2) + close_separator.set_margin_bottom(2) + footer.pack_start(close_separator, False, False, 0) + # In-window Close so the dialog can always be dismissed, even on WMs # that hide the title-bar close button for Gtk.Dialog windows (#323). close_button = Gtk.Button(label="Close") diff --git a/tests/test_settings_dialog.py b/tests/test_settings_dialog.py index 73008bd..749480b 100644 --- a/tests/test_settings_dialog.py +++ b/tests/test_settings_dialog.py @@ -859,6 +859,14 @@ class TestSettingsNavigation(unittest.TestCase): # No persistent bottom strip below the pages self.assertNotIn("def _build_status_strip(self):", self.source_code) + def test_close_button_separated_from_dictation_test(self): + """Close sits below a separator so it reads as dialog chrome (#651).""" + footer_body = self.source_code.split("def _build_sidebar_footer")[1].split("\n def ")[0] + after_test = footer_body.split("footer.pack_start(self.test_output_revealer")[1] + before_close = after_test.split('close_button = Gtk.Button(label="Close")')[0] + self.assertIn("Gtk.Separator", before_close) + self.assertIn("footer.pack_start(close_separator", before_close) + def test_sidebar_icons_use_adwaita_names(self): """Sidebar icons must resolve in the stock Adwaita theme.""" for icon in [