sidebar: Give the New Playlist entry the "card" style class

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2023-06-13 11:19:18 -04:00
parent c375d2366a
commit 37f81825b1
2 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class Section(section.Section):
self._entry.connect("activate", self.__add_new_playlist)
self._entry.connect("changed", self.__entry_changed)
self._entry.connect("icon-release", self.__entry_icon_release)
self._entry.add_css_class("card")
def __add_new_playlist(self, entry: Gtk.Entry) -> None:
if self.table.create(entry.get_text()) is not None:

View File

@ -67,6 +67,7 @@ class TestPlaylists(tests.util.TestCase):
Gtk.EntryIconPosition.PRIMARY), "list-add")
self.assertIsNone(self.playlists._entry.get_icon_name(
Gtk.EntryIconPosition.SECONDARY))
self.assertTrue(self.playlists._entry.has_css_class("card"))
with unittest.mock.patch.object(self.playlists.extra_widget,
"popdown") as mock_popdown: