diff --git a/res/appimage/AppRun b/res/appimage/AppRun index 3577152..90b5bbf 100644 --- a/res/appimage/AppRun +++ b/res/appimage/AppRun @@ -25,9 +25,9 @@ if [ ! -f ~/.picacg/db/version ];then echo "mkdir version" fi -if [ ! -f ~/.picacg/db/book.db ] || [ "`cat ~/.picacg/db/version`" != "v1.4.8" ] ; then +if [ ! -f ~/.picacg/db/book.db ] || [ "`cat ~/.picacg/db/version`" != "v1.4.9" ] ; then cp ${HERE}/db/book.db ~/.picacg/db/ - echo "v1.4.8" > ~/.picacg/db/version + echo "v1.4.9" > ~/.picacg/db/version echo "copy db" fi diff --git a/src/component/dialog/base_mask_dialog.py b/src/component/dialog/base_mask_dialog.py index 8a0d865..59bf6b4 100644 --- a/src/component/dialog/base_mask_dialog.py +++ b/src/component/dialog/base_mask_dialog.py @@ -66,7 +66,7 @@ def showEvent(self, e): opacityAni.setEasingCurve(QEasingCurve.InSine) opacityAni.finished.connect(opacityEffect.deleteLater) opacityAni.start() - super().showEvent(e) + QWidget.showEvent(self, e) # def closeEvent(self, e): # """ 淡出 """ diff --git a/src/component/scroll/read_scroll.py b/src/component/scroll/read_scroll.py index fbf062c..6f371d0 100644 --- a/src/component/scroll/read_scroll.py +++ b/src/component/scroll/read_scroll.py @@ -1,6 +1,6 @@ import weakref -from PySide6.QtCore import QPropertyAnimation, QEasingCurve, QAbstractAnimation +from PySide6.QtCore import QPropertyAnimation, QEasingCurve, QAbstractAnimation, Qt from PySide6.QtWidgets import QScrollBar from qt_owner import QtOwner @@ -35,10 +35,22 @@ def __init__(self, parent): # self.valueChanged.connect(self.ValueChange) self.oldv = 0 - # def ValueChange(self,value): - # self.oldv = value - # print("2, {}".format(value)) + @property + def stripModel(self): + return self._owner().qtTool.stripModel + + @property + def isCurReadModel(self): + if self.orientation() == Qt.Orientation.Vertical: + return self.stripModel == ReadMode.UpDown + else: + return True + # + # def ValueChange(self,value): + # # self.oldv = value + # print("2, {}".format(value)) + # # def AniValueChange(self, value): # print("1, {}".format(value)) @@ -57,9 +69,11 @@ def ResetAniValueByAdd(self, oldV, addV): scrollTime = min(self.maxScrollTme, int(laveV / changeV * self.lastScrollTime)) if scrollTime > 0: self.ani.stop() + # print("ani stop 5") self.StartAni(self.value(), self.lastAniEndV, scrollTime) else: self.ani.stop() + # print("ani stop 6") self.StartAni(self.value(), self.value(), self.scrollTime) def AniValueByAdd(self, addV): @@ -73,14 +87,15 @@ def AniValueByAdd(self, addV): self.lastAniEndV = self.lastAniStartV + v laveV = self.lastAniEndV - self.lastAniStartV - scrollTime = 0 - if changeV != 0: - scrollTime = min(self.maxScrollTme, int(laveV / changeV * self.lastScrollTime)) - if scrollTime <= 0: - scrollTime = self.scrollTime + scrollTime = self.scrollTime + # if changeV != 0: + # scrollTime = min(self.maxScrollTme, int(laveV / changeV * self.lastScrollTime)) + # if scrollTime <= 0: + # scrollTime = self.scrollTime - # print("add setV, {}".format(self.lastAniEndV)) + # print("add setV, {}, {}, {}".format(scrollTime,self.value(), self.lastAniEndV)) self.ani.stop() + # print("ani stop 1") self.StartAni(self.value(), self.lastAniEndV, scrollTime) # def AniValueChange(self, value): @@ -108,6 +123,7 @@ def Finished(self): def StopScroll(self): self.ani.stop() + # print("ani stop 2") # # def Scroll(self, value, time=0): # if self.ani.state() == QAbstractAnimation.State.Running: @@ -123,6 +139,20 @@ def StopScroll(self): def ForceSetValue(self, value): self.ani.stop() + # print("ani stop 3") + # print("force setV, {}".format(value)) + QScrollBar.setValue(self, value) + self.StartAni(value, value, self.scrollTime) + + def ForceSetValue2(self, value, isAdd): + if value == self.value(): + if isAdd and self.stripModel != ReadMode.RightLeftScroll: + self.__value = self.__value + 1 + else: + self.__value = self.__value - 1 + + self.ani.stop() + # print("ani stop 3") # print("force setV, {}".format(value)) QScrollBar.setValue(self, value) self.StartAni(value, value, self.scrollTime) @@ -144,8 +174,11 @@ def setValue(self, value: int): # stop running animation if self.ani.state() == self.ani.State.Running: self.AniValueByAdd(value-self.value()) + # print("ani stop 1") + # self.StartAni(self.value(), value, self.scrollTime) else: self.ani.stop() + # print("ani stop 4") self.StartAni(self.value(), value, self.scrollTime) def scrollValue(self, value: int): @@ -167,14 +200,16 @@ def OnValueChange(self, value): # self.UpdateScrollBar(value) self.__value = value + if not self.isCurReadModel: + return if not ReadMode.isScroll(self.scrollArea.initReadMode): return - curPictureSize = self.labelSize.get(self.readImg.curIndex) - nextPictureSize = self.labelSize.get(self.readImg.curIndex + 1, 0) changeIndex = self.readImg.curIndex if self.scrollArea.initReadMode == ReadMode.RightLeftScroll: newValue = value + self.scrollArea.width() + curPictureSize = self.labelSize.get(self.readImg.curIndex) + nextPictureSize = self.labelSize.get(self.readImg.curIndex - 1, 0) while True: ## 切换上一图片 if addValue > 0 and newValue >= nextPictureSize: @@ -195,8 +230,10 @@ def OnValueChange(self, value): else: break curPictureSize = self.labelSize.get(changeIndex) - nextPictureSize = self.labelSize.get(changeIndex + 1, 0) + nextPictureSize = self.labelSize.get(changeIndex - 1, 0) else: + curPictureSize = self.labelSize.get(self.readImg.curIndex) + nextPictureSize = self.labelSize.get(self.readImg.curIndex + 1, 0) while True: ## 切换上一图片 if addValue < 0 and value < curPictureSize: @@ -217,6 +254,8 @@ def OnValueChange(self, value): break curPictureSize = self.labelSize.get(changeIndex) nextPictureSize = self.labelSize.get(changeIndex + 1, 0) + print("change, {}->{}, {}->{}".format(self.readImg.curIndex, changeIndex, curPictureSize, nextPictureSize)) + if self.readImg.curIndex == changeIndex: return elif self.readImg.curIndex > changeIndex: @@ -225,4 +264,4 @@ def OnValueChange(self, value): elif self.readImg.curIndex < changeIndex: self.readImg.curIndex = changeIndex self.scrollArea.changeNextPage.emit(self.readImg.curIndex) - return + return \ No newline at end of file diff --git a/src/component/widget/main_widget.py b/src/component/widget/main_widget.py index 7cbe542..2f99e9b 100644 --- a/src/component/widget/main_widget.py +++ b/src/component/widget/main_widget.py @@ -21,6 +21,7 @@ def __init__(self): FramelessMainWindow.__init__(self) Ui_MainWindows.__init__(self) self.setupUi(self) + self.setTitleBar(self.widget) self.totalStackWidget.setAttribute(Qt.WA_TranslucentBackground) self.widget.setAttribute(Qt.WA_TranslucentBackground) diff --git a/src/component/widget/navigation_widget.py b/src/component/widget/navigation_widget.py index a6f4c68..a920a4b 100644 --- a/src/component/widget/navigation_widget.py +++ b/src/component/widget/navigation_widget.py @@ -21,7 +21,7 @@ def __init__(self, parent=None): QtTaskBase.__init__(self) self.setupUi(self) if Setting.IsUseTitleBar.value: - self.scrollArea.setFixedHeight(300) + self.scrollArea.setFixedHeight(380) # self.resize(260, 800) self.__ani = QPropertyAnimation(self, b"geometry") self.__connect = None diff --git a/src/component/widget/qframelesswindow/linux/__init__.py b/src/component/widget/qframelesswindow/linux/__init__.py index 35e5ba8..188920e 100644 --- a/src/component/widget/qframelesswindow/linux/__init__.py +++ b/src/component/widget/qframelesswindow/linux/__init__.py @@ -14,7 +14,7 @@ class LinuxFramelessWindow(QWidget): BORDER_WIDTH = 5 def __init__(self, parent=None): - super().__init__(parent=parent) + QWidget.__init__(self, parent=parent) self.windowEffect = LinuxWindowEffect(self) self.titleBar = TitleBar(self) self._isResizeEnabled = True @@ -26,7 +26,7 @@ def __init__(self, parent=None): self.resize(500, 500) def resizeEvent(self, e): - super().resizeEvent(e) + QWidget.resizeEvent(self, e) self.titleBar.resize(self.width(), self.titleBar.height()) def updateFrameless(self): @@ -82,4 +82,4 @@ def eventFilter(self, obj, event): elif obj in (self, self.titleBar) and et == QEvent.MouseButtonPress and edges: LinuxMoveResize.starSystemResize(self, event.globalPos(), edges) - return super().eventFilter(obj, event) + return QWidget.eventFilter(self, obj, event) diff --git a/src/component/widget/qframelesswindow/mac/__init__.py b/src/component/widget/qframelesswindow/mac/__init__.py index 7ae8517..960e050 100644 --- a/src/component/widget/qframelesswindow/mac/__init__.py +++ b/src/component/widget/qframelesswindow/mac/__init__.py @@ -12,7 +12,7 @@ class MacFramelessWindow(QWidget): """ Frameless window for Linux system """ def __init__(self, parent=None): - super().__init__(parent=parent) + QWidget.__init__(self, parent=parent) self.windowEffect = MacWindowEffect(self) # must enable acrylic effect before creating title bar if isinstance(self, AcrylicWindow): @@ -53,15 +53,15 @@ def setResizeEnabled(self, isEnabled: bool): self._isResizeEnabled = isEnabled def resizeEvent(self, e): - super().resizeEvent(e) + QWidget.resizeEvent(self, e) self.titleBar.resize(self.width(), self.titleBar.height()) def paintEvent(self, e): - super().paintEvent(e) + QWidget.paintEvent(self, e) self.__hideSystemTitleBar() def changeEvent(self, event): - super().changeEvent(event) + QWidget.changeEvent(self, event) if event.type() == QEvent.WindowStateChange: self.__hideSystemTitleBar() @@ -87,7 +87,7 @@ class AcrylicWindow(MacFramelessWindow): """ A frameless window with acrylic effect """ def __init__(self, parent=None): - super().__init__(parent) + MacFramelessWindow.__init__(self, parent) self.setAttribute(Qt.WA_TranslucentBackground) self.windowEffect.setAcrylicEffect(self.winId()) self.setStyleSheet("background: transparent") diff --git a/src/component/widget/qframelesswindow/titlebar/__init__.py b/src/component/widget/qframelesswindow/titlebar/__init__.py index 1c7cdcf..5980da1 100644 --- a/src/component/widget/qframelesswindow/titlebar/__init__.py +++ b/src/component/widget/qframelesswindow/titlebar/__init__.py @@ -14,7 +14,7 @@ class TitleBarBase(QWidget): """ Title bar base class """ def __init__(self, parent): - super().__init__(parent) + QWidget.__init__(self, parent) self.minBtn = MinimizeButton(parent=self) self.closeBtn = CloseButton(parent=self) self.maxBtn = MaximizeButton(parent=self) @@ -37,7 +37,7 @@ def eventFilter(self, obj, e): self.maxBtn.setMaxState(self.window().isMaximized()) return False - return super().eventFilter(obj, e) + return QWidget.eventFilter(self, obj, e) def mouseDoubleClickEvent(self, event): """ Toggles the maximization state of the window """ @@ -98,7 +98,7 @@ class TitleBar(TitleBarBase): """ Title bar with minimize, maximum and close button """ def __init__(self, parent): - super().__init__(parent) + TitleBarBase.__init__(self, parent) self.hBoxLayout = QHBoxLayout(self) # add buttons to layout @@ -115,7 +115,7 @@ class StandardTitleBar(TitleBar): """ Title bar with icon and title """ def __init__(self, parent): - super().__init__(parent) + TitleBar.__init__(self,parent) # add window icon self.iconLabel = QLabel(self) self.iconLabel.setFixedSize(20, 20) diff --git a/src/component/widget/qframelesswindow/windows/__init__.py b/src/component/widget/qframelesswindow/windows/__init__.py index 51d298e..9ebe8c1 100644 --- a/src/component/widget/qframelesswindow/windows/__init__.py +++ b/src/component/widget/qframelesswindow/windows/__init__.py @@ -23,7 +23,7 @@ class WindowsFramelessWindow(QWidget): BORDER_WIDTH = 5 def __init__(self, parent=None): - super().__init__(parent=parent) + QWidget.__init__(self, parent) self.windowEffect = WindowsWindowEffect(self) self.titleBar = TitleBar(self) self._isResizeEnabled = True @@ -69,14 +69,14 @@ def setResizeEnabled(self, isEnabled: bool): self._isResizeEnabled = isEnabled def resizeEvent(self, e): - super().resizeEvent(e) + QWidget.resizeEvent(self, e) self.titleBar.resize(self.width(), self.titleBar.height()) def nativeEvent(self, eventType, message): """ Handle the Windows message """ msg = MSG.from_address(message.__int__()) if not msg.hWnd: - return super().nativeEvent(eventType, message) + return QWidget.nativeEvent(self, eventType, message) if msg.message == win32con.WM_NCHITTEST and self._isResizeEnabled: pos = QCursor.pos() @@ -141,7 +141,7 @@ def nativeEvent(self, eventType, message): result = 0 if not msg.wParam else win32con.WVR_REDRAW return True, result - return super().nativeEvent(eventType, message) + return QWidget.nativeEvent(self, eventType, message) def __onScreenChanged(self): hWnd = int(self.windowHandle().winId()) @@ -153,12 +153,12 @@ class AcrylicWindow(WindowsFramelessWindow): """ A frameless window with acrylic effect """ def __init__(self, parent=None): - super().__init__(parent=parent) + QWidget.__init__(self, parent=parent) self.__closedByKey = False self.setStyleSheet("AcrylicWindow{background:transparent}") def updateFrameless(self): - super().updateFrameless() + WindowsFramelessWindow.updateFrameless(self) self.windowEffect.enableBlurBehindWindow(self.winId()) if win_utils.isWin7() and self.parent(): @@ -187,12 +187,12 @@ def nativeEvent(self, eventType, message): QApplication.sendEvent(self, QCloseEvent()) return False, 0 - return super().nativeEvent(eventType, message) + return WindowsFramelessWindow.nativeEvent(self, eventType, message) def closeEvent(self, e): if not self.__closedByKey or QApplication.quitOnLastWindowClosed(): self.__closedByKey = False - return super().closeEvent(e) + return WindowsFramelessWindow.closeEvent(self,e) # system tray icon self.__closedByKey = False diff --git a/src/component/widget/windows/frame_less_widget.py b/src/component/widget/windows/frame_less_widget.py index 005a8d7..e64659a 100644 --- a/src/component/widget/windows/frame_less_widget.py +++ b/src/component/widget/windows/frame_less_widget.py @@ -23,7 +23,7 @@ class FrameLessWidget(QWidget): BORDER_WIDTH = 10 def __init__(self, parent=None): - super().__init__(parent) + QWidget.__init__(self, parent) self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint) # self.setWindowFlags(Qt.FramelessWindowHint) diff --git a/src/config/config.py b/src/config/config.py index 610b998..a5bed75 100644 --- a/src/config/config.py +++ b/src/config/config.py @@ -100,6 +100,7 @@ ImageDomain = [ "s3.picacomic.com", + "s2.picacomic.com", "storage.diwodiwo.xyz", # "img.diwodiwo.xyz", "storage1.picacomic.com", diff --git a/src/config/global_config.py b/src/config/global_config.py index d3af0b0..13b38ab 100644 --- a/src/config/global_config.py +++ b/src/config/global_config.py @@ -26,7 +26,7 @@ class GlobalConfig: Address = GlobalItem(["104.21.91.145", "188.114.98.153"]) AddressIpv6 = GlobalItem(["2606:4700:d:28:dbf4:26f3:c265:73bc", "2a06:98c1:3120:ca71:be2c:c721:d2b5:5dbf"]) ImageUrl = GlobalItem("s3.picacomic.com") - ImageServerList = GlobalItem(["s3.picacomic.com", "storage.diwodiwo.xyz", "storage-b.picacomic.com", "storage1.picacomic.com"]) + ImageServerList = GlobalItem(["s3.picacomic.com", "storage.diwodiwo.xyz", "s2.picacomic.com", "storage1.picacomic.com", "storage-b.picacomic.com"]) ImageJumList = GlobalItem(["img.picacomic.com", "img.diwodiwo.xyz"]) def __init__(self): diff --git a/src/config/setting.py b/src/config/setting.py index fffcc5d..92ea955 100644 --- a/src/config/setting.py +++ b/src/config/setting.py @@ -144,6 +144,7 @@ class Setting: TurnSpeed = SettingValue("ReadSetting", 5000, False) ScrollSpeed = SettingValue("ReadSetting", 400, False) PreDownWaifu2x = SettingValue("ReadSetting", 1, False) + IsOpenOpenGL = SettingValue("ReadSetting", 1, True) # Other UserId = SettingValue("Other", "", False) diff --git a/src/db/book.db b/src/db/book.db index 14699b2..ada626c 100644 Binary files a/src/db/book.db and b/src/db/book.db differ diff --git a/src/interface/ui_book_info.py b/src/interface/ui_book_info.py index 9341a7d..f5cb22f 100644 --- a/src/interface/ui_book_info.py +++ b/src/interface/ui_book_info.py @@ -33,7 +33,7 @@ class Ui_BookInfo(object): def setupUi(self, BookInfo): if not BookInfo.objectName(): BookInfo.setObjectName(u"BookInfo") - BookInfo.resize(914, 691) + BookInfo.resize(943, 691) BookInfo.setStyleSheet(u"QToolButton\n" "{\n" "background-color:transparent;\n" @@ -70,7 +70,7 @@ def setupUi(self, BookInfo): self.scrollArea.setWidgetResizable(True) self.scrollAreaWidgetContents = QWidget() self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents") - self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 894, 671)) + self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 923, 671)) self.verticalLayout_3 = QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.gridLayout_3 = QGridLayout() diff --git a/src/interface/ui_book_right.py b/src/interface/ui_book_right.py new file mode 100644 index 0000000..20fec90 --- /dev/null +++ b/src/interface/ui_book_right.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'ui_book_right.ui' +## +## Created by: Qt User Interface Compiler version 6.2.4 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QCommandLinkButton, QFrame, QHBoxLayout, + QLabel, QLayout, QListView, QListWidgetItem, + QPlainTextEdit, QSizePolicy, QVBoxLayout, QWidget) + +from component.list.tag_list_widget import TagListWidget + +class Ui_BookRight(object): + def setupUi(self, BookRight): + if not BookRight.objectName(): + BookRight.setObjectName(u"BookRight") + BookRight.resize(400, 370) + self.verticalLayout = QVBoxLayout(BookRight) + self.verticalLayout.setObjectName(u"verticalLayout") + self.horizontalLayout_3 = QHBoxLayout() + self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") + self.label = QLabel(BookRight) + self.label.setObjectName(u"label") + self.label.setMaximumSize(QSize(40, 16777215)) + self.label.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + + self.horizontalLayout_3.addWidget(self.label) + + self.title = QLabel(BookRight) + self.title.setObjectName(u"title") + self.title.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + + self.horizontalLayout_3.addWidget(self.title) + + + self.verticalLayout.addLayout(self.horizontalLayout_3) + + self.horizontalLayout_8 = QHBoxLayout() + self.horizontalLayout_8.setObjectName(u"horizontalLayout_8") + self.label_6 = QLabel(BookRight) + self.label_6.setObjectName(u"label_6") + self.label_6.setMaximumSize(QSize(40, 16777215)) + + self.horizontalLayout_8.addWidget(self.label_6) + + self.idLabel = QLabel(BookRight) + self.idLabel.setObjectName(u"idLabel") + + self.horizontalLayout_8.addWidget(self.idLabel) + + + self.verticalLayout.addLayout(self.horizontalLayout_8) + + self.horizontalLayout_11 = QHBoxLayout() + self.horizontalLayout_11.setObjectName(u"horizontalLayout_11") + self.horizontalLayout_11.setSizeConstraint(QLayout.SetDefaultConstraint) + self.label_2 = QLabel(BookRight) + self.label_2.setObjectName(u"label_2") + self.label_2.setMinimumSize(QSize(0, 0)) + self.label_2.setMaximumSize(QSize(16777215, 40)) + + self.horizontalLayout_11.addWidget(self.label_2) + + self.autorList = TagListWidget(BookRight) + self.autorList.setObjectName(u"autorList") + self.autorList.setMaximumSize(QSize(16777215, 60)) + self.autorList.setStyleSheet(u"background-color:transparent;") + self.autorList.setFrameShape(QFrame.NoFrame) + self.autorList.setProperty("showDropIndicator", True) + self.autorList.setFlow(QListView.LeftToRight) + self.autorList.setSpacing(10) + + self.horizontalLayout_11.addWidget(self.autorList) + + + self.verticalLayout.addLayout(self.horizontalLayout_11) + + self.horizontalLayout_5 = QHBoxLayout() + self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") + self.label_3 = QLabel(BookRight) + self.label_3.setObjectName(u"label_3") + self.label_3.setMaximumSize(QSize(40, 16777215)) + self.label_3.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + + self.horizontalLayout_5.addWidget(self.label_3) + + self.description = QPlainTextEdit(BookRight) + self.description.setObjectName(u"description") + self.description.setStyleSheet(u"QPlainTextEdit {background-color:transparent;}") + self.description.setReadOnly(True) + + self.horizontalLayout_5.addWidget(self.description) + + + self.verticalLayout.addLayout(self.horizontalLayout_5) + + self.horizontalLayout_6 = QHBoxLayout() + self.horizontalLayout_6.setObjectName(u"horizontalLayout_6") + self.label_4 = QLabel(BookRight) + self.label_4.setObjectName(u"label_4") + self.label_4.setMaximumSize(QSize(16777215, 40)) + + self.horizontalLayout_6.addWidget(self.label_4) + + self.categoriesList = TagListWidget(BookRight) + self.categoriesList.setObjectName(u"categoriesList") + self.categoriesList.setMaximumSize(QSize(16777215, 60)) + self.categoriesList.setStyleSheet(u"QListWidget {background-color:transparent;}\n" +"QListWidget::item {\n" +" background-color:rgb(251, 239, 243);\n" +" color: rgb(196, 95, 125);\n" +" border:2px solid red;\n" +" border-radius: 10px;\n" +" border-color:rgb(196, 95, 125);\n" +"}\n" +"/* \u9f20\u6807\u5728\u6309\u94ae\u4e0a\u65f6\uff0c\u6309\u94ae\u989c\u8272 */\n" +" QListWidget::item:hover \n" +"{\n" +" background-color:rgb(21, 85, 154);\n" +" border-radius: 10px;\n" +" color: rgb(0, 0, 0);\n" +"}\n" +"") + self.categoriesList.setFrameShape(QFrame.NoFrame) + self.categoriesList.setSpacing(6) + + self.horizontalLayout_6.addWidget(self.categoriesList) + + + self.verticalLayout.addLayout(self.horizontalLayout_6) + + self.horizontalLayout_7 = QHBoxLayout() + self.horizontalLayout_7.setObjectName(u"horizontalLayout_7") + self.label_5 = QLabel(BookRight) + self.label_5.setObjectName(u"label_5") + self.label_5.setMaximumSize(QSize(40, 40)) + + self.horizontalLayout_7.addWidget(self.label_5) + + self.tagList = QWidget(BookRight) + self.tagList.setObjectName(u"tagList") + self.tagList.setStyleSheet(u"QPushButton {\n" +" background-color:rgb(251, 239, 243);\n" +" color: rgb(196, 95, 125);\n" +" border:2px solid red;\n" +" border-radius: 10px;\n" +" border-color:rgb(196, 95, 125);\n" +"}\n" +"/* \u9f20\u6807\u5728\u6309\u94ae\u4e0a\u65f6\uff0c\u6309\u94ae\u989c\u8272 */\n" +"QPushButton:hover \n" +"{\n" +" background-color:rgb(21, 85, 154);\n" +" border-radius: 10px;\n" +" color: rgb(0, 0, 0);\n" +"}\n" +"") + + self.horizontalLayout_7.addWidget(self.tagList) + + + self.verticalLayout.addLayout(self.horizontalLayout_7) + + self.horizontalLayout_9 = QHBoxLayout() + self.horizontalLayout_9.setObjectName(u"horizontalLayout_9") + self.label_7 = QLabel(BookRight) + self.label_7.setObjectName(u"label_7") + self.label_7.setMaximumSize(QSize(55, 20)) + + self.horizontalLayout_9.addWidget(self.label_7) + + self.views = QLabel(BookRight) + self.views.setObjectName(u"views") + self.views.setMaximumSize(QSize(16777215, 20)) + + self.horizontalLayout_9.addWidget(self.views) + + + self.verticalLayout.addLayout(self.horizontalLayout_9) + + self.commandLinkButton = QCommandLinkButton(BookRight) + self.commandLinkButton.setObjectName(u"commandLinkButton") + sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.commandLinkButton.sizePolicy().hasHeightForWidth()) + self.commandLinkButton.setSizePolicy(sizePolicy) + + self.verticalLayout.addWidget(self.commandLinkButton) + + + self.retranslateUi(BookRight) + + QMetaObject.connectSlotsByName(BookRight) + # setupUi + + def retranslateUi(self, BookRight): + BookRight.setWindowTitle(QCoreApplication.translate("BookRight", u"Form", None)) + self.label.setText(QCoreApplication.translate("BookRight", u"\u6807\u9898\uff1a", None)) + self.title.setText(QCoreApplication.translate("BookRight", u"\u6807\u9898", None)) + self.label_6.setText(QCoreApplication.translate("BookRight", u"id:", None)) + self.idLabel.setText("") + self.label_2.setText(QCoreApplication.translate("BookRight", u"\u4f5c\u8005\uff1a", None)) + self.label_3.setText(QCoreApplication.translate("BookRight", u"\u63cf\u8ff0\uff1a", None)) + self.label_4.setText(QCoreApplication.translate("BookRight", u"\u5206\u7c7b\uff1a", None)) + self.label_5.setText(QCoreApplication.translate("BookRight", u"Tags\uff1a", None)) + self.label_7.setText(QCoreApplication.translate("BookRight", u"\u89c2\u770b\u6570\uff1a", None)) + self.views.setText(QCoreApplication.translate("BookRight", u"\u89c2\u770b\u6570", None)) + self.commandLinkButton.setText(QCoreApplication.translate("BookRight", u"\u770b\u4e86\u8fd9\u8fb9\u672c\u5b50\u7684\u4eba\u4e5f\u5728\u770b", None)) + # retranslateUi + diff --git a/src/interface/ui_book_rightui.py b/src/interface/ui_book_rightui.py new file mode 100644 index 0000000..7906a0a --- /dev/null +++ b/src/interface/ui_book_rightui.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'ui_book_rightui.ui' +## +## Created by: Qt User Interface Compiler version 6.2.4 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QCommandLinkButton, QFrame, QHBoxLayout, + QLabel, QLayout, QListView, QListWidgetItem, + QPlainTextEdit, QSizePolicy, QVBoxLayout, QWidget) + +from component.list.tag_list_widget import TagListWidget + +class Ui_Form(object): + def setupUi(self, Form): + if not Form.objectName(): + Form.setObjectName(u"Form") + Form.resize(400, 370) + self.verticalLayout = QVBoxLayout(Form) + self.verticalLayout.setObjectName(u"verticalLayout") + self.horizontalLayout_3 = QHBoxLayout() + self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") + self.label = QLabel(Form) + self.label.setObjectName(u"label") + self.label.setMaximumSize(QSize(40, 16777215)) + self.label.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + + self.horizontalLayout_3.addWidget(self.label) + + self.title = QLabel(Form) + self.title.setObjectName(u"title") + self.title.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + + self.horizontalLayout_3.addWidget(self.title) + + + self.verticalLayout.addLayout(self.horizontalLayout_3) + + self.horizontalLayout_8 = QHBoxLayout() + self.horizontalLayout_8.setObjectName(u"horizontalLayout_8") + self.label_6 = QLabel(Form) + self.label_6.setObjectName(u"label_6") + self.label_6.setMaximumSize(QSize(40, 16777215)) + + self.horizontalLayout_8.addWidget(self.label_6) + + self.idLabel = QLabel(Form) + self.idLabel.setObjectName(u"idLabel") + + self.horizontalLayout_8.addWidget(self.idLabel) + + + self.verticalLayout.addLayout(self.horizontalLayout_8) + + self.horizontalLayout_11 = QHBoxLayout() + self.horizontalLayout_11.setObjectName(u"horizontalLayout_11") + self.horizontalLayout_11.setSizeConstraint(QLayout.SetDefaultConstraint) + self.label_2 = QLabel(Form) + self.label_2.setObjectName(u"label_2") + self.label_2.setMinimumSize(QSize(0, 0)) + self.label_2.setMaximumSize(QSize(16777215, 40)) + + self.horizontalLayout_11.addWidget(self.label_2) + + self.autorList = TagListWidget(Form) + self.autorList.setObjectName(u"autorList") + self.autorList.setMaximumSize(QSize(16777215, 60)) + self.autorList.setStyleSheet(u"background-color:transparent;") + self.autorList.setFrameShape(QFrame.NoFrame) + self.autorList.setProperty("showDropIndicator", True) + self.autorList.setFlow(QListView.LeftToRight) + self.autorList.setSpacing(10) + + self.horizontalLayout_11.addWidget(self.autorList) + + + self.verticalLayout.addLayout(self.horizontalLayout_11) + + self.horizontalLayout_5 = QHBoxLayout() + self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") + self.label_3 = QLabel(Form) + self.label_3.setObjectName(u"label_3") + self.label_3.setMaximumSize(QSize(40, 16777215)) + self.label_3.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + + self.horizontalLayout_5.addWidget(self.label_3) + + self.description = QPlainTextEdit(Form) + self.description.setObjectName(u"description") + self.description.setStyleSheet(u"QPlainTextEdit {background-color:transparent;}") + self.description.setReadOnly(True) + + self.horizontalLayout_5.addWidget(self.description) + + + self.verticalLayout.addLayout(self.horizontalLayout_5) + + self.horizontalLayout_6 = QHBoxLayout() + self.horizontalLayout_6.setObjectName(u"horizontalLayout_6") + self.label_4 = QLabel(Form) + self.label_4.setObjectName(u"label_4") + self.label_4.setMaximumSize(QSize(16777215, 40)) + + self.horizontalLayout_6.addWidget(self.label_4) + + self.categoriesList = TagListWidget(Form) + self.categoriesList.setObjectName(u"categoriesList") + self.categoriesList.setMaximumSize(QSize(16777215, 60)) + self.categoriesList.setStyleSheet(u"QListWidget {background-color:transparent;}\n" +"QListWidget::item {\n" +" background-color:rgb(251, 239, 243);\n" +" color: rgb(196, 95, 125);\n" +" border:2px solid red;\n" +" border-radius: 10px;\n" +" border-color:rgb(196, 95, 125);\n" +"}\n" +"/* \u9f20\u6807\u5728\u6309\u94ae\u4e0a\u65f6\uff0c\u6309\u94ae\u989c\u8272 */\n" +" QListWidget::item:hover \n" +"{\n" +" background-color:rgb(21, 85, 154);\n" +" border-radius: 10px;\n" +" color: rgb(0, 0, 0);\n" +"}\n" +"") + self.categoriesList.setFrameShape(QFrame.NoFrame) + self.categoriesList.setSpacing(6) + + self.horizontalLayout_6.addWidget(self.categoriesList) + + + self.verticalLayout.addLayout(self.horizontalLayout_6) + + self.horizontalLayout_7 = QHBoxLayout() + self.horizontalLayout_7.setObjectName(u"horizontalLayout_7") + self.label_5 = QLabel(Form) + self.label_5.setObjectName(u"label_5") + self.label_5.setMaximumSize(QSize(40, 40)) + + self.horizontalLayout_7.addWidget(self.label_5) + + self.tagList = QWidget(Form) + self.tagList.setObjectName(u"tagList") + self.tagList.setStyleSheet(u"QPushButton {\n" +" background-color:rgb(251, 239, 243);\n" +" color: rgb(196, 95, 125);\n" +" border:2px solid red;\n" +" border-radius: 10px;\n" +" border-color:rgb(196, 95, 125);\n" +"}\n" +"/* \u9f20\u6807\u5728\u6309\u94ae\u4e0a\u65f6\uff0c\u6309\u94ae\u989c\u8272 */\n" +"QPushButton:hover \n" +"{\n" +" background-color:rgb(21, 85, 154);\n" +" border-radius: 10px;\n" +" color: rgb(0, 0, 0);\n" +"}\n" +"") + + self.horizontalLayout_7.addWidget(self.tagList) + + + self.verticalLayout.addLayout(self.horizontalLayout_7) + + self.horizontalLayout_9 = QHBoxLayout() + self.horizontalLayout_9.setObjectName(u"horizontalLayout_9") + self.label_7 = QLabel(Form) + self.label_7.setObjectName(u"label_7") + self.label_7.setMaximumSize(QSize(55, 20)) + + self.horizontalLayout_9.addWidget(self.label_7) + + self.views = QLabel(Form) + self.views.setObjectName(u"views") + self.views.setMaximumSize(QSize(16777215, 20)) + + self.horizontalLayout_9.addWidget(self.views) + + + self.verticalLayout.addLayout(self.horizontalLayout_9) + + self.commandLinkButton = QCommandLinkButton(Form) + self.commandLinkButton.setObjectName(u"commandLinkButton") + sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.commandLinkButton.sizePolicy().hasHeightForWidth()) + self.commandLinkButton.setSizePolicy(sizePolicy) + + self.verticalLayout.addWidget(self.commandLinkButton) + + + self.retranslateUi(Form) + + QMetaObject.connectSlotsByName(Form) + # setupUi + + def retranslateUi(self, Form): + Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None)) + self.label.setText(QCoreApplication.translate("Form", u"\u6807\u9898\uff1a", None)) + self.title.setText(QCoreApplication.translate("Form", u"\u6807\u9898", None)) + self.label_6.setText(QCoreApplication.translate("Form", u"id:", None)) + self.idLabel.setText("") + self.label_2.setText(QCoreApplication.translate("Form", u"\u4f5c\u8005\uff1a", None)) + self.label_3.setText(QCoreApplication.translate("Form", u"\u63cf\u8ff0\uff1a", None)) + self.label_4.setText(QCoreApplication.translate("Form", u"\u5206\u7c7b\uff1a", None)) + self.label_5.setText(QCoreApplication.translate("Form", u"Tags\uff1a", None)) + self.label_7.setText(QCoreApplication.translate("Form", u"\u89c2\u770b\u6570\uff1a", None)) + self.views.setText(QCoreApplication.translate("Form", u"\u89c2\u770b\u6570", None)) + self.commandLinkButton.setText(QCoreApplication.translate("Form", u"\u770b\u4e86\u8fd9\u8fb9\u672c\u5b50\u7684\u4eba\u4e5f\u5728\u770b", None)) + # retranslateUi + diff --git a/src/interface/ui_download.py b/src/interface/ui_download.py index d3d43f8..b34688e 100644 --- a/src/interface/ui_download.py +++ b/src/interface/ui_download.py @@ -23,7 +23,7 @@ class Ui_Download(object): def setupUi(self, Download): if not Download.objectName(): Download.setObjectName(u"Download") - Download.resize(820, 361) + Download.resize(920, 440) self.gridLayout_2 = QGridLayout(Download) self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout = QGridLayout() @@ -55,7 +55,7 @@ def setupUi(self, Download): self.tableWidget.setHorizontalHeaderItem(10, __qtablewidgetitem10) self.tableWidget.setObjectName(u"tableWidget") - self.gridLayout.addWidget(self.tableWidget, 4, 0, 1, 1) + self.gridLayout.addWidget(self.tableWidget, 5, 0, 1, 1) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") @@ -63,11 +63,6 @@ def setupUi(self, Download): self.horizontalLayout.addItem(self.horizontalSpacer) - self.redownloadRadio = QCheckBox(Download) - self.redownloadRadio.setObjectName(u"redownloadRadio") - - self.horizontalLayout.addWidget(self.redownloadRadio) - self.updateNew = QPushButton(Download) self.updateNew.setObjectName(u"updateNew") @@ -93,18 +88,32 @@ def setupUi(self, Download): self.horizontalLayout.addWidget(self.pushButton_4) + + self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1) + + + self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1) + + self.horizontalLayout_2 = QHBoxLayout() + self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") + self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) + + self.horizontalLayout_2.addItem(self.horizontalSpacer_2) + + self.redownloadRadio = QCheckBox(Download) + self.redownloadRadio.setObjectName(u"redownloadRadio") + + self.horizontalLayout_2.addWidget(self.redownloadRadio) + self.radioButton = QRadioButton(Download) self.radioButton.setObjectName(u"radioButton") self.radioButton.setEnabled(True) self.radioButton.setChecked(True) - self.horizontalLayout.addWidget(self.radioButton) - - - self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1) + self.horizontalLayout_2.addWidget(self.radioButton) - self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) + self.gridLayout_2.addLayout(self.horizontalLayout_2, 0, 0, 1, 1) self.retranslateUi(Download) @@ -141,12 +150,12 @@ def retranslateUi(self, Download): ___qtablewidgetitem9.setText(QCoreApplication.translate("Download", u"\u8f6c\u6362\u8017\u65f6", None)); ___qtablewidgetitem10 = self.tableWidget.horizontalHeaderItem(10) ___qtablewidgetitem10.setText(QCoreApplication.translate("Download", u"\u8f6c\u6362\u72b6\u6001", None)); - self.redownloadRadio.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u5931\u8d25\u540e1\u5206\u949f\u81ea\u52a8\u91cd\u8bd5", None)) - self.updateNew.setText(QCoreApplication.translate("Download", u"\u66f4\u65b0\u6240\u6709New\u7ae0\u8282", None)) - self.pushButton.setText(QCoreApplication.translate("Download", u"\u5168\u90e8\u5f00\u59cb\u4e0b\u8f7d", None)) - self.pushButton_3.setText(QCoreApplication.translate("Download", u"\u5168\u90e8\u6682\u505c\u4e0b\u8f7d", None)) - self.pushButton_2.setText(QCoreApplication.translate("Download", u"\u5168\u90e8\u5f00\u59cb\u8f6c\u6362", None)) - self.pushButton_4.setText(QCoreApplication.translate("Download", u"\u5168\u90e8\u6682\u505c\u8f6c\u6362", None)) - self.radioButton.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u81ea\u52a8\u8fdb\u884cWaifu2x\u8f6c\u6362", None)) + self.updateNew.setText(QCoreApplication.translate("Download", u"\u66f4\u65b0New\u7ae0\u8282", None)) + self.pushButton.setText(QCoreApplication.translate("Download", u"\u5f00\u59cb\u4e0b\u8f7d", None)) + self.pushButton_3.setText(QCoreApplication.translate("Download", u"\u6682\u505c\u4e0b\u8f7d", None)) + self.pushButton_2.setText(QCoreApplication.translate("Download", u"\u5f00\u59cb\u8f6c\u6362", None)) + self.pushButton_4.setText(QCoreApplication.translate("Download", u"\u6682\u505c\u8f6c\u6362", None)) + self.redownloadRadio.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u5931\u8d25\u540e\u81ea\u52a8\u91cd\u8bd5", None)) + self.radioButton.setText(QCoreApplication.translate("Download", u"\u4e0b\u8f7d\u81ea\u52a8Waifu2x\u8f6c\u6362", None)) # retranslateUi diff --git a/src/interface/ui_setting_new.py b/src/interface/ui_setting_new.py index 4a0aacf..1b65747 100644 --- a/src/interface/ui_setting_new.py +++ b/src/interface/ui_setting_new.py @@ -83,7 +83,7 @@ def setupUi(self, SettingNew): self.scrollArea.setWidgetResizable(True) self.scrollAreaWidgetContents = QWidget() self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents") - self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 727, 3043)) + self.scrollAreaWidgetContents.setGeometry(QRect(0, -899, 727, 3096)) self.scrollAreaWidgetContents.setStyleSheet(u"") self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout_4.setObjectName(u"verticalLayout_4") @@ -521,6 +521,17 @@ def setupUi(self, SettingNew): self.verticalLayout_17.addLayout(self.horizontalLayout_35) + self.label_40 = QLabel(self.frame_14) + self.label_40.setObjectName(u"label_40") + self.label_40.setFont(font2) + + self.verticalLayout_17.addWidget(self.label_40) + + self.openglBox = QCheckBox(self.frame_14) + self.openglBox.setObjectName(u"openglBox") + + self.verticalLayout_17.addWidget(self.openglBox) + self.verticalLayout_4.addWidget(self.frame_14) @@ -1477,6 +1488,8 @@ def retranslateUi(self, SettingNew): self.categoryBox.setItemText(0, QCoreApplication.translate("SettingNew", u"\u663e\u793a", None)) self.categoryBox.setItemText(1, QCoreApplication.translate("SettingNew", u"\u4e0d\u663e\u793a", None)) + self.label_40.setText(QCoreApplication.translate("SettingNew", u"\u56fe\u7247\u6d4f\u89c8\u8bbe\u7f6e", None)) + self.openglBox.setText(QCoreApplication.translate("SettingNew", u"\u5f00\u542fOpenGL\u52a0\u901f", None)) self.label_10.setText(QCoreApplication.translate("SettingNew", u"\u65e5\u5fd7\u7b49\u7ea7\uff1a", None)) self.logutton0.setText(QCoreApplication.translate("SettingNew", u"Warn", None)) self.logutton1.setText(QCoreApplication.translate("SettingNew", u"Info", None)) diff --git a/src/server/sql_server.py b/src/server/sql_server.py index 0469d16..e65d204 100644 --- a/src/server/sql_server.py +++ b/src/server/sql_server.py @@ -393,6 +393,7 @@ def SearchFavorite(page, sortKey=0, sortId=0, searchText=""): @staticmethod def Search(wordList, isTitle, isAutor, isDes, isTag, isCategory, isCreator, categorys, page, sortKey=0, sortId=0): + wordList = Converter('zh-hans').convert(wordList) data = "" sql2Data = "" wordList2 = wordList.split("|") @@ -494,7 +495,7 @@ def _GetSearchWhere(word, isTitle, isAuthor, isDes, isTag, isCategory, isCreator @staticmethod def Search2(wordList, isTitle, isAuthor, isDes, isTag, isCategory, isCreator, categorys, page, sortKey=0, sortId=0): - + wordList = Converter('zh-hans').convert(wordList) wordList2 = wordList.split(" ") exclude = [] andWords = [] diff --git a/src/start.py b/src/start.py index a1d380d..0e3ab23 100644 --- a/src/start.py +++ b/src/start.py @@ -29,6 +29,7 @@ if hasattr(es, "msg"): config.ErrorMsg = es.msg +from PySide6.QtCore import Qt from PySide6.QtGui import QFont, QFontDatabase from PySide6 import QtWidgets # 导入PySide6部件 from PySide6.QtNetwork import QLocalSocket, QLocalServer diff --git a/src/view/info/book_info_right.py b/src/view/info/book_info_right.py new file mode 100644 index 0000000..8ab9538 --- /dev/null +++ b/src/view/info/book_info_right.py @@ -0,0 +1,11 @@ +from PySide6 import QtWidgets + +from interface.ui_book_right import Ui_BookRight + + +class BookInfoRight(QtWidgets.QWidget, Ui_BookRight): + + def __init__(self): + super(self.__class__, self).__init__() + Ui_BookRight.__init__(self) + self.setupUi(self) \ No newline at end of file diff --git a/src/view/info/book_info_view.py b/src/view/info/book_info_view.py index a7d5e3c..ca9fc67 100644 --- a/src/view/info/book_info_view.py +++ b/src/view/info/book_info_view.py @@ -6,11 +6,12 @@ from PySide6.QtCore import Qt, QSize, QEvent, Signal from PySide6.QtGui import QColor, QFont, QPixmap, QIcon from PySide6.QtWidgets import QListWidgetItem, QLabel, QApplication, QScroller, QPushButton, QButtonGroup, QMessageBox, \ - QListView + QListView, QWidget from component.layout.flow_layout import FlowLayout from config.setting import Setting from interface.ui_book_info import Ui_BookInfo +from interface.ui_book_right import Ui_BookRight from qt_owner import QtOwner from server import req, ToolUtil, config, Status, Log from server.sql_server import SqlServer @@ -36,16 +37,7 @@ def __init__(self): self.pictureData = None self.isFavorite = False self.isLike = False - self.picture.installEventFilter(self) - self.title.setWordWrap(True) - self.title.setTextInteractionFlags(Qt.TextBrowserInteraction) - self.autorList.clicked.connect(self.ClickAutorItem) - self.autorList.setContextMenuPolicy(Qt.CustomContextMenu) - self.autorList.customContextMenuRequested.connect(self.CopyClickAutorItem) - - self.idLabel.setTextInteractionFlags(Qt.TextBrowserInteraction) - self.description.setTextInteractionFlags(Qt.TextBrowserInteraction) self.starButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.starButton.setIconSize(QSize(50, 50)) @@ -55,12 +47,6 @@ def __init__(self): self.favoriteButton.setIconSize(QSize(50, 50)) self.commentButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.commentButton.setIconSize(QSize(50, 50)) - self.description.adjustSize() - self.title.adjustSize() - - self.categoriesList.clicked.connect(self.ClickCategoriesItem) - self.categoriesList.setContextMenuPolicy(Qt.CustomContextMenu) - self.categoriesList.customContextMenuRequested.connect(self.CopyClickCategoriesItem) # self.tagsList.clicked.connect(self.ClickTagsItem) # self.tagsList.setContextMenuPolicy(Qt.CustomContextMenu) @@ -96,6 +82,23 @@ def __init__(self): self.commentButton.clicked.connect(self.OpenComment) # self.epsListWidget.verticalScrollBar().rangeChanged.connect(self.ChageMaxNum) self.epsListWidget.setMinimumHeight(300) + + self.title.setWordWrap(True) + self.title.setTextInteractionFlags(Qt.TextBrowserInteraction) + self.autorList.clicked.connect(self.ClickAutorItem) + self.autorList.setContextMenuPolicy(Qt.CustomContextMenu) + self.autorList.customContextMenuRequested.connect(self.CopyClickAutorItem) + + self.idLabel.setTextInteractionFlags(Qt.TextBrowserInteraction) + self.description.setTextInteractionFlags(Qt.TextBrowserInteraction) + + self.description.adjustSize() + self.title.adjustSize() + + self.categoriesList.clicked.connect(self.ClickCategoriesItem) + self.categoriesList.setContextMenuPolicy(Qt.CustomContextMenu) + self.categoriesList.customContextMenuRequested.connect(self.CopyClickCategoriesItem) + self.ReloadHistory.connect(self.LoadHistory) self.pageBox.currentIndexChanged.connect(self.UpdateEpsPageData) @@ -104,6 +107,7 @@ def __init__(self): self.readOffline.clicked.connect(self.StartRead2) self.flowLayout = FlowLayout(self.tagList) + def UpdateFavoriteIcon(self): p = QPixmap() if self.isFavorite: diff --git a/src/view/main/main_view.py b/src/view/main/main_view.py index 25063e2..0df5d56 100644 --- a/src/view/main/main_view.py +++ b/src/view/main/main_view.py @@ -31,11 +31,16 @@ def __init__(self): QtOwner().SetOwner(self) Main.__init__(self) QtTaskBase.__init__(self) + # self.setAttribute(Qt.WA_PaintOnScreen, False) # 禁用屏幕缓存 + # self.setAttribute(Qt.WA_NoSystemBackground, True) # 去除系统背景 + # self.setAttribute(Qt.WA_OpaquePaintEvent, True) # 设置为不透明的paint event self.resize(600, 600) self.setWindowTitle(config.ProjectName) self.setWindowIcon(QIcon(":/png/icon/logo_round.png")) # self.setAttribute(Qt.WA_TranslucentBackground) self.setAttribute(Qt.WA_QuitOnClose, True) + # self.setAttribute(Qt.WA_NoSystemBackground,True) + # self.setAutoFillBackground(False) self.timer = QTimer() self.timer.setInterval(1000) # self.timer.timeout.connect(self.AfterStartSuc) @@ -47,6 +52,8 @@ def __init__(self): desktop = screens[Setting.ScreenIndex.value].geometry() self.adjustSize() + # self.downloadView.setFixedWidth(150) + # self.bookInfoView.setFixedWidth(150) self.myInitSize = QSize(desktop.width() // 4 * 3, desktop.height() // 4 * 3) self.resize(desktop.width() // 4 * 3, desktop.height() // 4 * 3) self.move(self.width() // 8+desktop.x(), max(0, desktop.height()-self.height()) // 2+desktop.y()) diff --git a/src/view/read/read_enum.py b/src/view/read/read_enum.py index b5c02ed..0fe9242 100644 --- a/src/view/read/read_enum.py +++ b/src/view/read/read_enum.py @@ -27,6 +27,10 @@ def isDouble(model): def isRightLeft(model): return model in [ReadMode.RightLeftDouble, ReadMode.RightLeftDouble2, ReadMode.RightLeftScroll] + @staticmethod + def isUpDown(model): + return model not in [ReadMode.LeftRightScroll, ReadMode.RightLeftDouble2, ReadMode.RightLeftScroll] + @staticmethod def isScroll(model): return model in [ReadMode.UpDown, ReadMode.LeftRightScroll, ReadMode.RightLeftScroll] diff --git a/src/view/read/read_frame.py b/src/view/read/read_frame.py index 1e9ed08..508e659 100644 --- a/src/view/read/read_frame.py +++ b/src/view/read/read_frame.py @@ -52,6 +52,7 @@ def __init__(self, readImg): self.baseValue = 0 + @property def readImg(self): return self._readImg() diff --git a/src/view/read/read_graphics.py b/src/view/read/read_graphics.py index e30ffb1..cf64647 100644 --- a/src/view/read/read_graphics.py +++ b/src/view/read/read_graphics.py @@ -12,8 +12,10 @@ from config import config from qt_owner import QtOwner from config.setting import Setting +from tools.log import Log from tools.str import Str from view.read.read_enum import ReadMode, QtFileData +from view.read.read_opengl import ReadOpenGL from view.read.read_pool import QtReadImgPoolManager from view.read.read_qgraphics_proxy_widget import ReadQGraphicsProxyWidget @@ -59,11 +61,17 @@ def __init__(self, parent=None): self.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform) self.setCacheMode(QGraphicsView.CacheBackground) # self.setCacheMode(QGraphicsView.CacheNone) - self.openGl = QOpenGLWidget() - f = QSurfaceFormat() - f.setSamples(4) - self.openGl.setFormat(f) - self.setViewport(self.openGl) + if Setting.IsOpenOpenGL.value: + self.openGl = ReadOpenGL() + f = QSurfaceFormat() + # f.setVersion(4, 3) + a = f.version() + f.setSamples(4) + # f.setSwapInterval(0) + self.openGl.setFormat(f) + self.setViewport(self.openGl) + Log.Info("open opengl, ver:{}".format(a)) + self.setViewportUpdateMode(QGraphicsView.FullViewportUpdate) # self.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate) @@ -84,6 +92,8 @@ def __init__(self, parent=None): self.setWindowFlag(Qt.FramelessWindowHint) self.testItem = QGraphicsPixmapItem() self.allItems = [] + self.allItemsState = {} + self.itemWight = {} self.labelSize = {} self.initReadMode = None @@ -130,6 +140,10 @@ def maxPic(self): def qtTool(self): return self.parent().readImg.qtTool + @property + def curIndex(self): + return self.readImg.curIndex + @property def scaleCnt(self): return self.readImg.frame.scaleCnt @@ -184,7 +198,8 @@ def wheelEvent(self, e: QWheelEvent): value = int(self.qtTool.scrollSpeed.value()) else: value = - int(self.qtTool.scrollSpeed.value()) - if self.initReadMode != ReadMode.RightLeftScroll: + + if ReadMode.isUpDown(self.initReadMode): self.vScrollBar.scrollValue(value) else: self.hScrollBar.scrollValue(value) @@ -197,9 +212,9 @@ def Scale(self, ratio): self.labelSize[k] *= ratio if self.qtTool.stripModel == ReadMode.UpDown: - self.verticalScrollBar().ForceSetValue( oldValue* ratio) + self.verticalScrollBar().ForceSetValue2( oldValue* ratio, ratio > 1) elif ReadMode.isScroll(self.qtTool.stripModel): - self.horizontalScrollBar().ForceSetValue(oldValue * ratio) + self.horizontalScrollBar().ForceSetValue2(oldValue * ratio, ratio > 1) self.ResetMaxNum() def ScaleReset(self, oldScaleCnt): @@ -216,9 +231,9 @@ def ScaleReset(self, oldScaleCnt): else: ratio = 0.9 if self.qtTool.stripModel == ReadMode.UpDown: - self.verticalScrollBar().ForceSetValue(self.verticalScrollBar().value() * ratio) + self.verticalScrollBar().ForceSetValue2(self.verticalScrollBar().value() * ratio, ratio>1) elif ReadMode.isScroll(self.qtTool.stripModel): - self.horizontalScrollBar().ForceSetValue(self.horizontalScrollBar().value() * ratio) + self.horizontalScrollBar().ForceSetValue2(self.horizontalScrollBar().value() * ratio, ratio>1) newV2 = self.verticalScrollBar().value() # print(oldV, newV, newV2) # if oldScaleCnt != 0: @@ -475,7 +490,7 @@ def ResetMaxNum(self, addHeight=0): if addHeight > 0: self.GetScrollBar().ResetAniValueByAdd(oldV, addHeight) else: - self.GetScrollBar().ForceSetValue(oldV+ addHeight) + self.GetScrollBar().ForceSetValue2(oldV+ addHeight, addHeight > 0) self.ScaleResetVer() elif self.initReadMode in [ReadMode.LeftRightScroll]: maxSize = max(self.width(), self.labelSize.get(maxNum, 0) - self.width()) + 50 @@ -486,7 +501,7 @@ def ResetMaxNum(self, addHeight=0): if addHeight > 0: self.GetScrollBar().ResetAniValueByAdd(oldV, addHeight) else: - self.GetScrollBar().ForceSetValue(oldV + addHeight) + self.GetScrollBar().ForceSetValue2(oldV + addHeight, addHeight > 0) self.ScaleResetVer() elif self.initReadMode in [ReadMode.UpDown]: maxSize = max(self.height(), self.labelSize.get(maxNum, 0) - self.height()) + 50 @@ -496,7 +511,7 @@ def ResetMaxNum(self, addHeight=0): if addHeight > 0: self.GetScrollBar().ResetAniValueByAdd(oldV, addHeight) else: - self.GetScrollBar().ForceSetValue(oldV) + self.GetScrollBar().ForceSetValue2(oldV+addHeight, addHeight > 0) self.ScaleResetVer() else: self.graphicsScene.setSceneRect(0, 0, self.width(), max(self.height(), @@ -635,21 +650,36 @@ def LabelToPixmap(self, index): return self.graphicsItem1.pixmap().height(), self.graphicsItem1.pixmap().width() def ClearPixItem(self): - self.SetPixIem(self.readImg.curIndex, None) - if self.readImg.curIndex + 1 < self.readImg.maxPic: - self.SetPixIem(self.readImg.curIndex + 1, None) + self.allItemsState.clear() + self.ClearOtherPictureShow([]) + # self.SetPixIem(self.readImg.curIndex, None) + # if self.readImg.curIndex + 1 < self.readImg.maxPic: + # self.SetPixIem(self.readImg.curIndex + 1, None) return + def IsAlreadLoad(self, index, waifu2x): + if waifu2x: + state = 2 + else: + state = 1 + if self.allItemsState.get(index) == state and ReadMode.isScroll(self.readImg.stripModel): + return True + return False + def SetPixIem(self, index, data, isWaifu2x=False): if not self.allItems and ReadMode.isScroll(self.readImg.stripModel): return + notPic = False if not data: + notPic = True # self.labelWaifu2xState[index] = isWaifu2x if ReadMode.isScroll(self.initReadMode): self.PixmapToLabel(index) + self.allItemsState[index] = 0 return else: data = self.MakePixItem(index) + # else: # data.setDevicePixelRatio(self.devicePixelRatio()) @@ -675,7 +705,16 @@ def SetPixIem(self, index, data, isWaifu2x=False): newData.height() // radio, index, self.readImg.curIndex, oldPos) # print(index, pos, radio, newData.size(), self.size()) label.setPos(pos) + # print("set index, {}".format(index)) label.setPixmap(newData) + if not notPic: + if isWaifu2x: + self.allItemsState[index] = 2 + else: + self.allItemsState[index] = 1 + else: + self.allItemsState[index] = 0 + if self.initReadMode == ReadMode.UpDown: self.UpdateOtherHeight(index, oldHeight, label.pixmap().height() // radio) else: @@ -767,10 +806,12 @@ def UpdateOtherHeight(self, index, oldHeight, height): elif self.initReadMode in [ReadMode.LeftRightScroll, ReadMode.UpDown]: indexList = list(range(index + 1, self.readImg.maxPic)) indexList.append(self.readImg.maxPic) + if index < self.readImg.curIndex: + needAddHeight = addHeight curPixcurSize = self.labelSize.get(index) # TODO 需要重新定位 - if curPixcurSize < oldValue: - needAddHeight = addHeight + # if curPixcurSize < oldValue: + # needAddHeight = addHeight # self.GetScrollBar().ResetAniValueByAdd(oldValue, addHeight2) # self.oldValue = self.GetScrollBar().value() @@ -779,7 +820,7 @@ def UpdateOtherHeight(self, index, oldHeight, height): if self.initReadMode in [ReadMode.Samewight, ReadMode.LeftRight] and self.isLastPageMode: self.verticalScrollBar().ForceSetValue(self.verticalScrollBar().maximum()) return - + print("sub value, {}, {}, {}".format(index, addHeight, needAddHeight)) for lenSize, i in enumerate(indexList): self.labelSize[i] += addHeight2 @@ -815,8 +856,9 @@ def ResetScrollValue(self, index): def ChangeLastPage(self, index): # TODO 取消其他图片的显示, 节约内存占用 if ReadMode.isScroll(self.initReadMode): - if index + config.PreLoading < self.maxPic: - self.SetPixIem(index + config.PreLoading, None) + self.ClearOtherPictureShow(range(self.curIndex, self.curIndex + config.PreLook)) + # if index + config.PreLoading < self.maxPic: + # self.SetPixIem(index + config.PreLoading, None) elif ReadMode.isDouble(self.initReadMode): self.SetPixIem(index - 1, None) self.isLastPageMode = True @@ -827,8 +869,9 @@ def ChangeLastPage(self, index): def ChangeNextPage(self, index): # TODO 取消其他图片的显示, 节约内存占用 if ReadMode.isScroll(self.initReadMode): - if index - 1 >= 0: - self.SetPixIem(index - 1, None) + # if index - 1 >= 0: + # self.SetPixIem(index - 1, None) + self.ClearOtherPictureShow(range(self.curIndex, self.curIndex + config.PreLook)) elif ReadMode.isDouble(self.initReadMode): self.SetPixIem(index + 1, None) self.isLastPageMode = False @@ -840,15 +883,27 @@ def ChangePage(self, oldIndex, index): # TODO 取消其他图片的显示, 节约内存占用 if ReadMode.isScroll(self.initReadMode): - self.SetPixIem(oldIndex, None) - for newIndex in range(oldIndex + 1, min(oldIndex + config.PreLoading, self.maxPic)): - self.SetPixIem(newIndex, None) + self.ClearOtherPictureShow(range(oldIndex + 1, min(oldIndex + config.PreLoading, self.maxPic))) value = self.labelSize.get(index) self.GetScrollBar().ForceSetValue(value) self.isLastPageMode = False self.ReloadImg() return + def ClearOtherPictureShow(self, saveIndex): + if ReadMode.isScroll(self.initReadMode): + indexSet = set(saveIndex) + for i, state in self.allItemsState.items(): + if i in indexSet: + continue + if state > 0: + self.SetPixIem(i, None) + # self.SetPixIem(oldIndex, None) + # for newIndex in range(oldIndex + 1, min(oldIndex + config.PreLoading, self.maxPic)): + # self.SetPixIem(newIndex, None) + # value = self.labelSize.get(index) + # self.GetScrollBar().ForceSetValue(value) + # 缩放 def ChangeScale(self, scale=1): print("change scale, mode={}, scale={}, change:={}".format(self.initReadMode, self.frame.scaleCnt, scale)) diff --git a/src/view/read/read_opengl.py b/src/view/read/read_opengl.py new file mode 100644 index 0000000..cf8c85f --- /dev/null +++ b/src/view/read/read_opengl.py @@ -0,0 +1,38 @@ +from PySide6.QtOpenGLWidgets import QOpenGLWidget + + +class ReadOpenGL(QOpenGLWidget): + def __init__(self, parent=None): + QOpenGLWidget.__init__(self, parent) + + def paintGL(self) -> None: + print("paintGL") + return QOpenGLWidget.paintGL(self) + + def paintEngine(self) : + print("paintEngine") + return QOpenGLWidget.paintEngine(self) + + def paintEvent(self, e) -> None: + print("paintEvent, e:{}".format(e)) + return QOpenGLWidget.paintEvent(self, e) + + def repaint(self) -> None: + print("repaint") + return QOpenGLWidget.repaint(self) + + def resize(self, arg__1) -> None: + print("resize") + return QOpenGLWidget.resize(self, arg__1) + + def resizeGL(self, w:int, h:int) -> None: + print("resizeGL") + return QOpenGLWidget.resizeGL(self, w, h) + + def resizeEvent(self, e) -> None: + print("resizeEvent") + return QOpenGLWidget.resizeEvent(self, e) + + def initializeGL(self) -> None: + print("initializeGL") + return QOpenGLWidget.initializeGL(self) \ No newline at end of file diff --git a/src/view/read/read_tool.py b/src/view/read/read_tool.py index 81bf0f8..a912a73 100644 --- a/src/view/read/read_tool.py +++ b/src/view/read/read_tool.py @@ -523,6 +523,8 @@ def ChangeReadMode2(self, index): self.imgFrame.isLastPageMode = False self.stripModel = ReadMode(index) self.scrollArea.initReadMode = self.stripModel + self.scrollArea.allItemsState.clear() + self.ScalePicture2(100) if self.stripModel in [ReadMode.UpDown, ReadMode.Samewight]: self.ScalePicture2(80) diff --git a/src/view/read/read_view.py b/src/view/read/read_view.py index 8dee403..ec1c3e1 100644 --- a/src/view/read/read_view.py +++ b/src/view/read/read_view.py @@ -26,6 +26,7 @@ class ReadView(QtWidgets.QWidget, QtTaskBase): def __init__(self): super(self.__class__, self).__init__() QtTaskBase.__init__(self) + self.bookId = "" self.token = "" self.epsId = 0 @@ -557,7 +558,6 @@ def ShowImg(self, index): return isCurIndex = index == self.curIndex p = self.pictureData.get(index) - if not p or (not p.data) or (not p.cacheImage): self.scrollArea.SetPixIem(index, None) if isCurIndex: @@ -573,6 +573,7 @@ def ShowImg(self, index): # self.frame.process.hide() if config.CanWaifu2x: self.qtTool.modelBox.setEnabled(True) + assert isinstance(p, QtFileData) waifu2x = False if not p.isWaifu2x: @@ -602,6 +603,10 @@ def ShowImg(self, index): self.qtTool.SetData(pSize=p.qSize, dataLen=p.size, state=p.state, waifuState=p.waifuState) self.qtTool.UpdateText(p.model) + if self.frame.scrollArea.IsAlreadLoad(index, waifu2x): + # print("already load, {}".format(index)) + return + if p.isGif and not ReadMode.isScroll(self.stripModel): if p.isWaifu2x and p.waifuData: self.scrollArea.SetGifData(index, p.waifuData, p2, True) @@ -610,6 +615,7 @@ def ShowImg(self, index): else: pixMap = QPixmap(p2) pixMap.setDevicePixelRatio(p2.devicePixelRatio()) + # print("set index 1, {}".format(index)) self.scrollArea.SetPixIem(index, pixMap, waifu2x) # self.graphicsView.setSceneRect(QRectF(QPointF(0, 0), QPointF(pixMap.width(), pixMap.height()))) # self.frame.ScalePicture() diff --git a/src/view/setting/setting_view.py b/src/view/setting/setting_view.py index a32e77c..037dcbb 100644 --- a/src/view/setting/setting_view.py +++ b/src/view/setting/setting_view.py @@ -52,6 +52,7 @@ def __init__(self, parent=None): self.coverCheckBox.clicked.connect(partial(self.CheckButtonEvent, Setting.CoverIsOpenWaifu, self.coverCheckBox)) self.downAuto.clicked.connect(partial(self.CheckButtonEvent, Setting.DownloadAuto, self.downAuto)) self.titleBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsUseTitleBar, self.titleBox)) + self.openglBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsOpenOpenGL, self.openglBox)) self.grabGestureBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsGrabGesture, self.grabGestureBox)) # self.isShowClose.clicked.connect(partial(self.CheckButtonEvent, Setting.IsNotShowCloseTip, self.isShowClose)) @@ -225,6 +226,7 @@ def InitSetting(self): self.sockEdit.setText(Setting.Sock5Proxy.value) self.chatProxy.setChecked(Setting.ChatProxy.value) self.titleBox.setChecked(Setting.IsUseTitleBar.value) + self.openglBox.setChecked(Setting.IsOpenOpenGL.value) self.grabGestureBox.setChecked(Setting.IsGrabGesture.value) # self.isShowClose.setChecked(Setting.IsNotShowCloseTip.value) for index in range(self.encodeSelect.count()): diff --git a/src/view/user/login_proxy_widget.py b/src/view/user/login_proxy_widget.py index fde7825..9ca3231 100644 --- a/src/view/user/login_proxy_widget.py +++ b/src/view/user/login_proxy_widget.py @@ -49,6 +49,7 @@ def __init__(self): # config.Address[1] = Setting.SaveCacheAddress.value self.LoadSetting() + self.InitImgUrlList() self.UpdateServer() self.commandLinkButton.clicked.connect(self.OpenUrl) diff --git a/ui/component/ui_book_right.ui b/ui/component/ui_book_right.ui new file mode 100644 index 0000000..c8fc8e2 --- /dev/null +++ b/ui/component/ui_book_right.ui @@ -0,0 +1,295 @@ + + + BookRight + + + + 0 + 0 + 400 + 370 + + + + Form + + + + + + + + + 40 + 16777215 + + + + 标题: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + 标题 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + 40 + 16777215 + + + + id: + + + + + + + + + + + + + + + + QLayout::SetDefaultConstraint + + + + + + 0 + 0 + + + + + 16777215 + 40 + + + + 作者: + + + + + + + + 16777215 + 60 + + + + background-color:transparent; + + + QFrame::NoFrame + + + true + + + QListView::LeftToRight + + + 10 + + + + + + + + + + + + 40 + 16777215 + + + + 描述: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + QPlainTextEdit {background-color:transparent;} + + + true + + + + + + + + + + + + 16777215 + 40 + + + + 分类: + + + + + + + + 16777215 + 60 + + + + QListWidget {background-color:transparent;} +QListWidget::item { + background-color:rgb(251, 239, 243); + color: rgb(196, 95, 125); + border:2px solid red; + border-radius: 10px; + border-color:rgb(196, 95, 125); +} +/* 鼠标在按钮上时,按钮颜色 */ + QListWidget::item:hover +{ + background-color:rgb(21, 85, 154); + border-radius: 10px; + color: rgb(0, 0, 0); +} + + + + QFrame::NoFrame + + + 6 + + + + + + + + + + + + 40 + 40 + + + + Tags: + + + + + + + QPushButton { + background-color:rgb(251, 239, 243); + color: rgb(196, 95, 125); + border:2px solid red; + border-radius: 10px; + border-color:rgb(196, 95, 125); +} +/* 鼠标在按钮上时,按钮颜色 */ +QPushButton:hover +{ + background-color:rgb(21, 85, 154); + border-radius: 10px; + color: rgb(0, 0, 0); +} + + + + + + + + + + + + + 55 + 20 + + + + 观看数: + + + + + + + + 16777215 + 20 + + + + 观看数 + + + + + + + + + + 0 + 0 + + + + 看了这边本子的人也在看 + + + + + + + + TagListWidget + QListWidget +
component.list.tag_list_widget.h
+
+
+ + +
diff --git a/ui/component/ui_book_rightui.ui b/ui/component/ui_book_rightui.ui new file mode 100644 index 0000000..323afa2 --- /dev/null +++ b/ui/component/ui_book_rightui.ui @@ -0,0 +1,295 @@ + + + Form + + + + 0 + 0 + 400 + 370 + + + + Form + + + + + + + + + 40 + 16777215 + + + + 标题: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + 标题 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + 40 + 16777215 + + + + id: + + + + + + + + + + + + + + + + QLayout::SetDefaultConstraint + + + + + + 0 + 0 + + + + + 16777215 + 40 + + + + 作者: + + + + + + + + 16777215 + 60 + + + + background-color:transparent; + + + QFrame::NoFrame + + + true + + + QListView::LeftToRight + + + 10 + + + + + + + + + + + + 40 + 16777215 + + + + 描述: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + QPlainTextEdit {background-color:transparent;} + + + true + + + + + + + + + + + + 16777215 + 40 + + + + 分类: + + + + + + + + 16777215 + 60 + + + + QListWidget {background-color:transparent;} +QListWidget::item { + background-color:rgb(251, 239, 243); + color: rgb(196, 95, 125); + border:2px solid red; + border-radius: 10px; + border-color:rgb(196, 95, 125); +} +/* 鼠标在按钮上时,按钮颜色 */ + QListWidget::item:hover +{ + background-color:rgb(21, 85, 154); + border-radius: 10px; + color: rgb(0, 0, 0); +} + + + + QFrame::NoFrame + + + 6 + + + + + + + + + + + + 40 + 40 + + + + Tags: + + + + + + + QPushButton { + background-color:rgb(251, 239, 243); + color: rgb(196, 95, 125); + border:2px solid red; + border-radius: 10px; + border-color:rgb(196, 95, 125); +} +/* 鼠标在按钮上时,按钮颜色 */ +QPushButton:hover +{ + background-color:rgb(21, 85, 154); + border-radius: 10px; + color: rgb(0, 0, 0); +} + + + + + + + + + + + + + 55 + 20 + + + + 观看数: + + + + + + + + 16777215 + 20 + + + + 观看数 + + + + + + + + + + 0 + 0 + + + + 看了这边本子的人也在看 + + + + + + + + TagListWidget + QListWidget +
component.list.tag_list_widget.h
+
+
+ + +
diff --git a/ui/ui_book_info.ui b/ui/ui_book_info.ui index 35a04f8..2b6325d 100644 --- a/ui/ui_book_info.ui +++ b/ui/ui_book_info.ui @@ -6,7 +6,7 @@ 0 0 - 914 + 943 691 @@ -55,7 +55,7 @@ QScrollArea {background-color:transparent;} 0 0 - 894 + 923 671 diff --git a/ui/ui_download.ui b/ui/ui_download.ui index 91d79a9..21e7bc8 100644 --- a/ui/ui_download.ui +++ b/ui/ui_download.ui @@ -6,17 +6,17 @@ 0 0 - 820 - 361 + 920 + 440 下载 - + - + @@ -90,58 +90,38 @@ - - - - 下载失败后1分钟自动重试 - - - - 更新所有New章节 + 更新New章节 - 全部开始下载 + 开始下载 - 全部暂停下载 + 暂停下载 - 全部开始转换 + 开始转换 - 全部暂停转换 - - - - - - - true - - - 下载自动进行Waifu2x转换 - - - true + 暂停转换 @@ -149,6 +129,43 @@ + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 下载失败后自动重试 + + + + + + + true + + + 下载自动Waifu2x转换 + + + true + + + + + diff --git a/ui/ui_setting_new.ui b/ui/ui_setting_new.ui index 04d5566..3b352fd 100644 --- a/ui/ui_setting_new.ui +++ b/ui/ui_setting_new.ui @@ -95,9 +95,9 @@ 0 - 0 + -899 727 - 3043 + 3096 @@ -927,6 +927,26 @@ + + + + + 12 + true + + + + 图片浏览设置 + + + + + + + 开启OpenGL加速 + + + @@ -2694,11 +2714,11 @@ - - - + + +