Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Oct 27, 2024
1 parent 34a1f9b commit 86324d1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
8 changes: 3 additions & 5 deletions src/interface/ui_waifu2x_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
5 changes: 4 additions & 1 deletion src/view/help/help_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions src/view/main/main_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
25 changes: 13 additions & 12 deletions src/view/read/read_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down
11 changes: 3 additions & 8 deletions ui/ui_waifu2x_tool.ui
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>275</width>
<width>281</width>
<height>480</height>
</rect>
</property>
Expand Down Expand Up @@ -256,11 +256,6 @@
<string>WEBP</string>
</property>
</item>
<item>
<property name="text">
<string>GIF</string>
</property>
</item>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -489,7 +484,7 @@
</item>
</layout>
</item>
<item alignment="Qt::AlignLeft">
<item alignment="Qt::AlignHCenter">
<widget class="QPushButton" name="headButton">
<property name="maximumSize">
<size>
Expand Down

0 comments on commit 86324d1

Please sign in to comment.