From daae654b8e8020cc21c65af4f148d4fc3fcacff0 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 6 Sep 2023 10:52:14 -0400 Subject: [PATCH] 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 --- tests/gtk/test_view.py | 6 +++--- xfstestsdb/gtk/icons/down-large-symbolic.svg | 2 ++ xfstestsdb/gtk/icons/xfstestsdb.gresource | Bin 2988 -> 3613 bytes xfstestsdb/gtk/icons/xfstestsdb.gresource.xml | 1 + xfstestsdb/gtk/view.py | 6 +++--- 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 xfstestsdb/gtk/icons/down-large-symbolic.svg diff --git a/tests/gtk/test_view.py b/tests/gtk/test_view.py index 837bee9..f56787f 100644 --- a/tests/gtk/test_view.py +++ b/tests/gtk/test_view.py @@ -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): diff --git a/xfstestsdb/gtk/icons/down-large-symbolic.svg b/xfstestsdb/gtk/icons/down-large-symbolic.svg new file mode 100644 index 0000000..f77d3d8 --- /dev/null +++ b/xfstestsdb/gtk/icons/down-large-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/xfstestsdb/gtk/icons/xfstestsdb.gresource b/xfstestsdb/gtk/icons/xfstestsdb.gresource index 454ca537290268e96fce3d09e21a6db3d899fe45..edc96a608f0f52c324e8aab01a502e506eabda17 100644 GIT binary patch delta 909 zcmZWo&ubGw6rN3!G;OH%P^?;&K`8XHo0-|&%q|FeQ!pL`4+F zR1ga}OaB3X9D+xM>RIsM!9&5LARat=)9+0d3p()See=!x=Djy$U#vbqx4$yJWieVC zRTCI1AkG0Lpq!(ENLTQzFPGSuT^+CYq0%o?nPIga?PGgEH!y%}E$8LA(MiotYk>Im0W|5VYICyTdy_ z5e%n>cCa~rg0a1=Y!GLIY_nA}FPBBlq}fX18geP04(+XGC$Y0px0NQH$jOG=IKVoX z-YmbGn>?+~*kuxNuac!g>fIRWLghj_(J4=s|N;Ae9e?aI_m>!xOHZx|V_V4e@oZX`zKHxvia? z;dVy`F5QFDa;(F8prPgUpm`|#kCc0d+?KpeKM|Rgc0D&hx8S~-aYssOjwEAJ$5$JV z5a^6VA*GffH}lKTM~|c#0xxm+_cZxYD1`5|7THnbHlxIi*3bFtdWB}nSnf@}07yNE z4N?#CRWHy+_j=VLpr`7=95$eaDL}y)K-_##!h#v70mSA9imw3DYk*iECMqt+*t$xTH8GNgwD-28QJPTz#NB7(jx$1&PJQy2X{bN%=XM$$G_Q z=|Bk}mtest-pass-symbolic.svg test-skip-symbolic.svg test-fail-symbolic.svg + down-large-symbolic.svg diff --git a/xfstestsdb/gtk/view.py b/xfstestsdb/gtk/view.py index 6250d5c..ef01030 100644 --- a/xfstestsdb/gtk/view.py +++ b/xfstestsdb/gtk/view.py @@ -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()