diff --git a/lector/delegates.py b/lector/delegates.py index 0ebbdf2..5517329 100644 --- a/lector/delegates.py +++ b/lector/delegates.py @@ -51,7 +51,8 @@ class LibraryDelegate(QtWidgets.QStyledItemDelegate): if not file_exists: painter.setOpacity(.7) QtWidgets.QStyledItemDelegate.paint(self, painter, option, index) - read_icon = pie_chart.pixmapper(-1, None, None, 36) + read_icon = pie_chart.pixmapper( + -1, None, self.parent.settings['consider_read_at'], 36) x_draw = option.rect.bottomRight().x() - 30 y_draw = option.rect.bottomRight().y() - 35 painter.drawPixmap(x_draw, y_draw, read_icon) diff --git a/lector/models.py b/lector/models.py index c87d31a..16847d3 100644 --- a/lector/models.py +++ b/lector/models.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # This file is a part of Lector, a Qt based ebook reader -# Copyright (C) 2017 BasioMeusPuga +# Copyright (C) 2017-2018 BasioMeusPuga # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/lector/resources/pie_chart.py b/lector/resources/pie_chart.py index 5a2cb2d..f49b1d6 100644 --- a/lector/resources/pie_chart.py +++ b/lector/resources/pie_chart.py @@ -105,7 +105,7 @@ def pixmapper(position_percent, temp_dir, consider_read_at, size): return_pixmap = QtGui.QIcon(':/images/error.svg').pixmap(size) return return_pixmap - if position_percent >= consider_read_at: # Consider book read @ 95% progress + if position_percent >= consider_read_at: # Consider book read @ this progress return_pixmap = QtGui.QIcon(':/images/checkmark.svg').pixmap(size) else: