This commit is contained in:
tonquer 2024-10-27 15:16:59 +08:00
parent 34a1f9b55c
commit 86324d160d
6 changed files with 25 additions and 27 deletions

View File

@ -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: |

View File

@ -42,7 +42,7 @@ class Ui_Waifu2xTool(object):
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 @@ class Ui_Waifu2xTool(object):
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 @@ class Ui_Waifu2xTool(object):
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 @@ class Ui_Waifu2xTool(object):
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 @@ class Ui_Waifu2xTool(object):
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))

View File

@ -65,7 +65,10 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
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):

View File

@ -216,6 +216,8 @@ class MainView(Main, QtTaskBase):
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)

View File

@ -92,20 +92,21 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
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)")

View File

@ -35,7 +35,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>275</width>
<width>281</width>
<height>480</height>
</rect>
</property>
@ -256,11 +256,6 @@
<string>WEBP</string>
</property>
</item>
<item>
<property name="text">
<string>GIF</string>
</property>
</item>
</widget>
</item>
</layout>
@ -344,7 +339,7 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<item alignment="Qt::AlignLeft">
<widget class="QLabel" name="label_9">
<property name="maximumSize">
<size>
@ -489,7 +484,7 @@
</item>
</layout>
</item>
<item alignment="Qt::AlignLeft">
<item alignment="Qt::AlignHCenter">
<widget class="QPushButton" name="headButton">
<property name="maximumSize">
<size>