gtk: Improvements to the failed test output viewer

I change the icon to a "down" arrow, and update the animation direction
to go up-and-down rather than left-and-right. I also change the button
text to say "done", which is a little clearer than "back".

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This commit is contained in:
Anna Schumaker 2023-09-06 10:52:14 -04:00
parent 528444cab6
commit daae654b8e
5 changed files with 9 additions and 6 deletions

View File

@ -383,8 +383,8 @@ class MessagesView(unittest.TestCase):
self.view._back)
self.assertEqual(self.view._back.props.child.props.icon_name,
"go-previous-symbolic")
self.assertEqual(self.view._back.props.child.props.label, "back")
"down-large-symbolic")
self.assertEqual(self.view._back.props.child.props.label, "done")
self.assertTrue(self.view._back.has_css_class("suggested-action"))
self.assertTrue(self.view._back.has_css_class("pill"))
@ -500,7 +500,7 @@ class TestXfstestsView(unittest.TestCase):
self.assertIsInstance(sep, Gtk.Separator)
self.assertIsInstance(self.view._stack, Gtk.Stack)
self.assertEqual(self.view._stack.props.transition_type,
Gtk.StackTransitionType.OVER_LEFT_RIGHT)
Gtk.StackTransitionType.OVER_UP_DOWN)
self.assertEqual(sep.get_next_sibling(), self.view._stack)
def test_testcase_view(self):

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m -0.00390625 3 v 1 c 0 0.292969 0.12890625 0.558594 0.32812525 0.738281 l 7.671875 7.675781 l 7.707031 -7.707031 c 0.183594 -0.179687 0.292969 -0.429687 0.292969 -0.707031 v -1 h -1 c -0.273438 0 -0.523438 0.113281 -0.707032 0.292969 c -0.007812 0.011719 -0.019531 0.019531 -0.03125 0.03125 l -6.261718 6.261719 l -6.257813 -6.261719 c -0.183593 -0.199219 -0.445312 -0.324219 -0.742187 -0.324219 z m 0 0"/></svg>

After

Width:  |  Height:  |  Size: 549 B

View File

@ -4,5 +4,6 @@
<file preprocess="xml-stripblanks">test-pass-symbolic.svg</file>
<file preprocess="xml-stripblanks">test-skip-symbolic.svg</file>
<file preprocess="xml-stripblanks">test-fail-symbolic.svg</file>
<file preprocess="xml-stripblanks">down-large-symbolic.svg</file>
</gresource>
</gresources>

View File

@ -242,11 +242,11 @@ class MessagesView(Gtk.Box):
def __init__(self):
"""Initialize a MessagesView."""
icon = "go-previous-symbolic"
icon = "down-large-symbolic"
super().__init__(orientation=Gtk.Orientation.VERTICAL, margin_top=24,
margin_start=24, margin_end=24, margin_bottom=24)
self._back = Gtk.Button(child=Adw.ButtonContent(icon_name=icon,
label="back"))
label="done"))
self._title = Adw.WindowTitle()
self._stdout = MessageView("stdout")
self._stderr = MessageView("stderr")
@ -299,7 +299,7 @@ class XfstestsView(Gtk.Box):
def __init__(self):
"""Initialize an XfstestsView."""
animation = Gtk.StackTransitionType.OVER_LEFT_RIGHT
animation = Gtk.StackTransitionType.OVER_UP_DOWN
super().__init__(orientation=Gtk.Orientation.VERTICAL)
self._environview = EnvironmentView()
self._propertyview = PropertyView()