diff options
| author | Joris Guyonvarch | 2025-12-29 19:26:31 +0100 |
|---|---|---|
| committer | Joris Guyonvarch | 2025-12-29 19:26:55 +0100 |
| commit | b91bcbf3c52fd25688835c43e23264eae647e397 (patch) | |
| tree | eef58047e5e38d6bc25d07bb3c93be3dfccbcce8 /src/book_flow.py | |
| parent | 2598fbf4d347eca3ba9c34feca4fcffb93de9d26 (diff) | |
Keep header bar visible when scrolling down books
Diffstat (limited to 'src/book_flow.py')
| -rw-r--r-- | src/book_flow.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/book_flow.py b/src/book_flow.py index 7697f29..e3b1165 100644 --- a/src/book_flow.py +++ b/src/book_flow.py @@ -17,10 +17,15 @@ from src.book_transfer import BookTransfer from src.picture_cache import PictureCache import src.book_files as book_files -class BookFlow(Gtk.FlowBox): +class BookFlow(Gtk.ScrolledWindow): + def __init__(self, window, resources, library, ereader, conn, books, progress, genre, msg): - Gtk.FlowBox.__init__(self) + Gtk.ScrolledWindow.__init__(self) + self.set_vexpand(True) + + self._flow_box = Gtk.FlowBox() + self.set_child(self._flow_box) self._window = window self._resources = resources @@ -40,7 +45,7 @@ class BookFlow(Gtk.FlowBox): if book_id: self._picture_cache.invalidate(f'{self._library}/{book_id}/cover-min.png') - self.remove_all() + self._flow_box.remove_all() self._flow_box_children = {} for book_id, data in sorted(books.items(), key=book_sort): if self._is_selected(data, progress, genre): @@ -60,7 +65,7 @@ class BookFlow(Gtk.FlowBox): flow_box_child = Gtk.FlowBoxChild() flow_box_child.set_child(picture) self._flow_box_children[book_id] = flow_box_child - self.append(flow_box_child) + self._flow_box.append(flow_box_child) # Private |
