Skip to content

Commit

Permalink
Disabled image loading for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Sep 27, 2023
1 parent f8886f2 commit 71018c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/adapters/controllers/free_books_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ void FreeBooksController::getBookMedia(const int id, const QString& url)

void FreeBooksController::getBookCover(const int id)
{
// There is a problem with book covers (jpegs) on linux with Qt 6.5.2, so don't
// load them for now.
#ifdef Q_OS_WIN
m_freeBooksService->getBookCover(id);
#endif
}

void FreeBooksController::deleteBookCover(const int id)
Expand Down
14 changes: 14 additions & 0 deletions src/presentation/freeBooksPage/MFreeBook.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ Item {
source: model.cover
fillMode: Image.PreserveAspectFit
}


/*
The item displaying when no book cover exists (usually a ".format" label)
*/
Label {
id: noImageLabel
Layout.alignment: Qt.AlignCenter
visible: bookCover.source == ""
text: ".jpeg"
color: Style.colorNoImageLabel
font.pointSize: 20
font.bold: true
}
}
}

Expand Down

0 comments on commit 71018c3

Please sign in to comment.