diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e31cbd9..0e345ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -254,7 +254,6 @@ jobs: run: | python -m pip install --upgrade pip pip install pyinstaller==4.6 - pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl pip install -r src\requirements_win7.txt - name: Build run: | diff --git a/src/interface/ui_waifu2x_tool.py b/src/interface/ui_waifu2x_tool.py index f212da4..11b477f 100644 --- a/src/interface/ui_waifu2x_tool.py +++ b/src/interface/ui_waifu2x_tool.py @@ -42,7 +42,7 @@ def setupUi(self, Waifu2xTool): self.scrollArea.setWidgetResizable(True) self.scrollAreaWidgetContents = QWidget() self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents") - self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 275, 480)) + self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 281, 480)) self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout_4.setObjectName(u"verticalLayout_4") self.verticalLayout_2 = QVBoxLayout() @@ -156,7 +156,6 @@ def setupUi(self, Waifu2xTool): self.fmtComboBox.addItem("") self.fmtComboBox.addItem("") self.fmtComboBox.addItem("") - self.fmtComboBox.addItem("") self.fmtComboBox.setObjectName(u"fmtComboBox") self.horizontalLayout_7.addWidget(self.fmtComboBox) @@ -215,7 +214,7 @@ def setupUi(self, Waifu2xTool): self.label_9.setObjectName(u"label_9") self.label_9.setMaximumSize(QSize(60, 16777215)) - self.horizontalLayout_11.addWidget(self.label_9) + self.horizontalLayout_11.addWidget(self.label_9, 0, Qt.AlignLeft) self.gpuLabel = QLabel(self.scrollAreaWidgetContents) self.gpuLabel.setObjectName(u"gpuLabel") @@ -298,7 +297,7 @@ def setupUi(self, Waifu2xTool): self.headButton.setObjectName(u"headButton") self.headButton.setMaximumSize(QSize(100, 16777215)) - self.verticalLayout_3.addWidget(self.headButton, 0, Qt.AlignLeft) + self.verticalLayout_3.addWidget(self.headButton, 0, Qt.AlignHCenter) self.verticalLayout_4.addLayout(self.verticalLayout_3) @@ -352,7 +351,6 @@ def retranslateUi(self, Waifu2xTool): self.fmtComboBox.setItemText(2, QCoreApplication.translate("Waifu2xTool", u"PNG", None)) self.fmtComboBox.setItemText(3, QCoreApplication.translate("Waifu2xTool", u"BMP", None)) self.fmtComboBox.setItemText(4, QCoreApplication.translate("Waifu2xTool", u"WEBP", None)) - self.fmtComboBox.setItemText(5, QCoreApplication.translate("Waifu2xTool", u"GIF", None)) self.changeButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u8f6c\u6362", None)) self.label_8.setText(QCoreApplication.translate("Waifu2xTool", u"\u5206\u8fa8\u7387\uff1a", None)) diff --git a/src/view/help/help_view.py b/src/view/help/help_view.py index 6bcdaba..d186f0a 100644 --- a/src/view/help/help_view.py +++ b/src/view/help/help_view.py @@ -65,7 +65,10 @@ def retranslateUi(self, Help): Ui_Help.retranslateUi(self, Help) self.version.setText(config.RealVersion) self.upTimeLabel.setText(config.TimeVersion) - self.waifu2x.setText(config.Waifu2xVersion) + if config.CanWaifu2x: + self.waifu2x.setText(config.Waifu2xVersion) + else: + self.waifu2x.setText("") self.configVer.setText("{}({})".format(GlobalConfig.Ver.value, GlobalConfig.VerTime.value)) def SwitchCheckPre(self): diff --git a/src/view/main/main_view.py b/src/view/main/main_view.py index 89dc859..d0b7adb 100644 --- a/src/view/main/main_view.py +++ b/src/view/main/main_view.py @@ -216,6 +216,8 @@ def Init(self): self.waifu2xToolView.changeButton.setEnabled(False) self.waifu2xToolView.changeButton.setEnabled(False) self.waifu2xToolView.modelName.setEnabled(False) + self.waifu2xToolView.ttaModel.setEnabled(False) + self.waifu2xToolView.changeButton.setEnabled(False) self.waifu2xToolView.SetStatus(False) Setting.IsOpenWaifu.SetValue(0) diff --git a/src/view/read/read_view.py b/src/view/read/read_view.py index 50182db..0038944 100644 --- a/src/view/read/read_view.py +++ b/src/view/read/read_view.py @@ -92,20 +92,21 @@ def SelectMenu(self): action = popMenu.addAction(Str.GetStr(Str.FullSwitch)+"(F11)") action.triggered.connect(self.qtTool.FullScreen) - - if Setting.IsOpenWaifu.value: - action = popMenu.addAction(Str.GetStr(Str.CloseAutoWaifu2x)) - else: - action = popMenu.addAction(Str.GetStr(Str.OpenAutoWaifu2x)) - action.triggered.connect(self.qtTool.checkBox.click) + if config.CanWaifu2x: + if Setting.IsOpenWaifu.value: + action = popMenu.addAction(Str.GetStr(Str.CloseAutoWaifu2x)) + else: + action = popMenu.addAction(Str.GetStr(Str.OpenAutoWaifu2x)) + action.triggered.connect(self.qtTool.checkBox.click) p = self.pictureData.get(self.curIndex) - if p: - if p.isWaifu2x: - action = popMenu.addAction(Str.GetStr(Str.CloseCurWaifu2x)+"(F2)") - else: - action = popMenu.addAction(Str.GetStr(Str.OpenCurWaifu2x)+"(F2)") - action.triggered.connect(self.qtTool.curWaifu2x.click) + if config.CanWaifu2x: + if p: + if p.isWaifu2x: + action = popMenu.addAction(Str.GetStr(Str.CloseCurWaifu2x)+"(F2)") + else: + action = popMenu.addAction(Str.GetStr(Str.OpenCurWaifu2x)+"(F2)") + action.triggered.connect(self.qtTool.curWaifu2x.click) menu2 = popMenu.addMenu(Str.GetStr(Str.ReadMode)) action = menu2.addAction("切换双页对齐(F10)") diff --git a/ui/ui_waifu2x_tool.ui b/ui/ui_waifu2x_tool.ui index 3256885..ea30782 100644 --- a/ui/ui_waifu2x_tool.ui +++ b/ui/ui_waifu2x_tool.ui @@ -35,7 +35,7 @@ 0 0 - 275 + 281 480 @@ -256,11 +256,6 @@ WEBP - - - GIF - - @@ -344,7 +339,7 @@ - + @@ -489,7 +484,7 @@ - +