diff --git a/emmental/nowplaying/autopause.py b/emmental/nowplaying/autopause.py index d67004d..ae76463 100644 --- a/emmental/nowplaying/autopause.py +++ b/emmental/nowplaying/autopause.py @@ -25,6 +25,8 @@ class Entry(Gtk.Entry): self.connect("icon_release", self.__icon_release) self.connect("notify::value", self.__update_text) + self.add_css_class("card") + def __set_value(self, newval: int) -> bool: if -1 <= newval <= 99: self.value = newval diff --git a/tests/nowplaying/test_autopause.py b/tests/nowplaying/test_autopause.py index 4621310..d3c4c0c 100644 --- a/tests/nowplaying/test_autopause.py +++ b/tests/nowplaying/test_autopause.py @@ -26,6 +26,7 @@ class TestAutopauseEntry(unittest.TestCase): self.assertIsInstance(self.entry, Gtk.Entry) self.assertTupleEqual(self.entry._timeout, (None, None)) self.assertEqual(self.entry.get_max_width_chars(), 20) + self.assertTrue(self.entry.has_css_class("card")) def test_placeholder_text(self): """Test changing the placeholder text with the value."""