From 2bc1b4018c7a8ad9488a2eea4f9dc2e7f188affa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 16 Jun 2024 15:42:20 +0530 Subject: [PATCH] Fix #2069317 [Background colour of the cover grid only changes after a restart](https://bugs.launchpad.net/calibre/+bug/2069317) --- src/calibre/gui2/library/alternate_views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/library/alternate_views.py b/src/calibre/gui2/library/alternate_views.py index 6d0f24fdc5..d27a09a527 100644 --- a/src/calibre/gui2/library/alternate_views.py +++ b/src/calibre/gui2/library/alternate_views.py @@ -878,9 +878,10 @@ class GridView(QListView): r, g, b = gprefs['cover_grid_color'] tex = gprefs['cover_grid_texture'] pal = self.palette() - pal.setColor(QPalette.ColorRole.Base, QColor(r, g, b)) + bgcol = QColor(r, g, b) + pal.setColor(QPalette.ColorRole.Base, bgcol) self.setPalette(pal) - ss = '' + ss = f'background-color: {bgcol.name()}; ' if tex: from calibre.gui2.preferences.texture_chooser import texture_path path = texture_path(tex)