Fix incorrect function argument

This commit is contained in:
BasioMeusPuga
2018-04-02 01:06:53 +05:30
parent 8c51cc047e
commit 366859ebe0
3 changed files with 4 additions and 3 deletions

View File

@@ -51,7 +51,8 @@ class LibraryDelegate(QtWidgets.QStyledItemDelegate):
if not file_exists: if not file_exists:
painter.setOpacity(.7) painter.setOpacity(.7)
QtWidgets.QStyledItemDelegate.paint(self, painter, option, index) 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 x_draw = option.rect.bottomRight().x() - 30
y_draw = option.rect.bottomRight().y() - 35 y_draw = option.rect.bottomRight().y() - 35
painter.drawPixmap(x_draw, y_draw, read_icon) painter.drawPixmap(x_draw, y_draw, read_icon)

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# This file is a part of Lector, a Qt based ebook reader # 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 # 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 # it under the terms of the GNU General Public License as published by

View File

@@ -105,7 +105,7 @@ def pixmapper(position_percent, temp_dir, consider_read_at, size):
return_pixmap = QtGui.QIcon(':/images/error.svg').pixmap(size) return_pixmap = QtGui.QIcon(':/images/error.svg').pixmap(size)
return return_pixmap 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) return_pixmap = QtGui.QIcon(':/images/checkmark.svg').pixmap(size)
else: else: