fix(settings): separate Close from dictation test controls (#670)
Add a horizontal separator between the sidebar Test Dictation controls and the in-window Close button so Close reads as dialog chrome rather than part of the testing section. Fixes #651
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user