mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More stupid PyQt enums
This commit is contained in:
parent
6b16decfe1
commit
055393d251
@ -8,7 +8,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from PyQt5.Qt import (
|
from PyQt5.Qt import (
|
||||||
QApplication, QMainWindow, QVBoxLayout, Qt, QKeySequence, QAction, QEvent,
|
QApplication, QMainWindow, QVBoxLayout, Qt, QKeySequence, QAction, QEvent, QStyle,
|
||||||
QActionGroup, QMenu, QPushButton, QWidget, QTimer, QMessageBox, pyqtSignal)
|
QActionGroup, QMenu, QPushButton, QWidget, QTimer, QMessageBox, pyqtSignal)
|
||||||
|
|
||||||
from calibre.gui2.dbus_export.utils import setup_for_cli_run
|
from calibre.gui2.dbus_export.utils import setup_for_cli_run
|
||||||
|
@ -9,7 +9,7 @@ import re
|
|||||||
from random import shuffle
|
from random import shuffle
|
||||||
|
|
||||||
from PyQt5.Qt import (Qt, QDialog, QDialogButtonBox, QTimer, QCheckBox, QLabel,
|
from PyQt5.Qt import (Qt, QDialog, QDialogButtonBox, QTimer, QCheckBox, QLabel,
|
||||||
QVBoxLayout, QIcon, QWidget, QTabWidget, QGridLayout, QApplication)
|
QVBoxLayout, QIcon, QWidget, QTabWidget, QGridLayout, QApplication, QStyle)
|
||||||
|
|
||||||
from calibre.gui2 import JSONConfig, info_dialog, error_dialog
|
from calibre.gui2 import JSONConfig, info_dialog, error_dialog
|
||||||
from calibre.gui2.dialogs.choose_format import ChooseFormatDialog
|
from calibre.gui2.dialogs.choose_format import ChooseFormatDialog
|
||||||
|
@ -53,7 +53,7 @@ class TagDelegate(QStyledItemDelegate): # {{{
|
|||||||
if self.old_look:
|
if self.old_look:
|
||||||
bg = option.palette.alternateBase() if option.features&option.Alternate else option.palette.base()
|
bg = option.palette.alternateBase() if option.features&option.Alternate else option.palette.base()
|
||||||
painter.fillRect(r, bg)
|
painter.fillRect(r, bg)
|
||||||
style.proxy().drawPrimitive(style.PE_PanelItemViewItem, option, painter, widget)
|
style.proxy().drawPrimitive(QStyle.PrimitiveElement.PE_PanelItemViewItem, option, painter, widget)
|
||||||
painter.setOpacity(0.3)
|
painter.setOpacity(0.3)
|
||||||
icon.paint(painter, r, option.decorationAlignment, QIcon.Mode.Normal, QIcon.State.On)
|
icon.paint(painter, r, option.decorationAlignment, QIcon.Mode.Normal, QIcon.State.On)
|
||||||
painter.restore()
|
painter.restore()
|
||||||
|
@ -11,7 +11,7 @@ from PyQt5.Qt import (
|
|||||||
QColor, QFont, QHBoxLayout, QIcon, QImage, QItemSelectionModel, QKeySequence,
|
QColor, QFont, QHBoxLayout, QIcon, QImage, QItemSelectionModel, QKeySequence,
|
||||||
QLabel, QMenu, QPainter, QPainterPath, QPixmap, QPushButton, QRect, QSizePolicy,
|
QLabel, QMenu, QPainter, QPainterPath, QPixmap, QPushButton, QRect, QSizePolicy,
|
||||||
Qt, QTextEdit, QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget, pyqtSignal,
|
Qt, QTextEdit, QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget, pyqtSignal,
|
||||||
QAbstractItemView, QDialog, QPalette
|
QAbstractItemView, QDialog, QPalette, QStyle
|
||||||
)
|
)
|
||||||
|
|
||||||
from calibre.constants import (
|
from calibre.constants import (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user