Remove unused imports, fix dup condition and dup declarations

master
Matthew Mingde Zeng 6 years ago
parent 23fe01bfbf
commit 26af7a3d56
  1. 2
      app/image-viewer/buffer.py
  2. 4
      app/pdf-viewer/buffer.py
  3. 6
      app/rss-reader/buffer.py
  4. 2
      core/buffer.py

@ -20,7 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from PyQt5 import QtCore
from PyQt5.QtCore import QRect, Qt
from PyQt5.QtCore import QRect
from PyQt5.QtGui import QColor, QPixmap, QPainter
from PyQt5.QtWidgets import QWidget
from core.buffer import Buffer

@ -21,7 +21,7 @@
from PyQt5 import QtCore
from PyQt5.QtCore import Qt, QRect, QEvent
from PyQt5.QtGui import QColor, QPixmap, QImage, QFont, QCursor
from PyQt5.QtGui import QColor, QPixmap, QImage, QFont
from PyQt5.QtGui import QPainter
from PyQt5.QtWidgets import QWidget
from core.buffer import Buffer
@ -737,7 +737,7 @@ class PdfViewerWidget(QWidget):
if len(bbox_list) >= 2:
tl_x, tl_y = 0, 0 # top left point
for index, bbox in enumerate(bbox_list[:-1]):
if (tl_x == 0) or (tl_x == 0):
if (tl_x == 0) or (tl_y == 0):
tl_x, tl_y = bbox[:2]
if bbox[0] > bbox_list[index + 1][2]:
br_x, br_y = bbox[2:] # bottom right

@ -20,10 +20,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from PyQt5.QtCore import QUrl, Qt
from PyQt5.QtGui import QColor, QPainter, QFont, QTextDocument
from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QWidget, QApplication, QWidget, QListWidget, QVBoxLayout, QLabel, QPushButton, QListWidgetItem, QStackedWidget, QSizePolicy
from PyQt5.QtGui import QColor, QFont
from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QWidget, QWidget, QListWidget, QVBoxLayout, QLabel, QListWidgetItem, QStackedWidget
from core.buffer import Buffer
from PyQt5 import QtWidgets, QtCore
from PyQt5 import QtCore
from core.browser import BrowserView
from core.utils import touch
import feedparser

@ -117,14 +117,12 @@ qt_key_dict = {
'''?''': Qt.Key_Question,
'''"''': Qt.Key_QuoteDbl,
'''`''': Qt.Key_QuoteLeft,
'''$''': Qt.Key_Dollar,
'''%''': Qt.Key_Percent,
'''^''': Qt.Key_AsciiCircum,
'''&''': Qt.Key_Ampersand,
'''*''': Qt.Key_Asterisk,
'''~''': Qt.Key_AsciiTilde,
'''!''': Qt.Key_Exclam,
'''/''': Qt.Key_Slash,
'''\'''': Qt.Key_Apostrophe,
'''SPC''': Qt.Key_Space,
'''RET''': Qt.Key_Return,

Loading…
Cancel
Save