Skip to content

The only downloader you need. 下载器的集大成者。

fix(ui): 动态按钮卡片尾部边距统一为 16px

XiaoYouChR5af4951e8ea9
diff --git a/Ghost-Downloader-3.py b/Ghost-Downloader-3.py
index 253358fb..8fc7284f 100644
--- a/Ghost-Downloader-3.py
+++ b/Ghost-Downloader-3.py
@@ -245,7 +245,7 @@ def startApp(application, isSilent=False):
if window is not None:
from qfluentwidgets import InfoBar, InfoBarPosition
InfoBar.success(
- window.tr("Pack 更新"),
+ window.tr("功能包更新"),
window.tr("{0} 将在下次启动时生效").format(info.label),
duration=5000,
position=InfoBarPosition.BOTTOM_RIGHT,
diff --git a/android/main.py b/android/main.py
index 1a294a61..673582ea 100644
--- a/android/main.py
+++ b/android/main.py
@@ -125,7 +125,7 @@ def startApp(application):
elif info.targetId != "app" and info.state == UpdateState.READY:
from qfluentwidgets import InfoBar, InfoBarPosition
InfoBar.success(
- mainWindow.tr("Pack 更新"),
+ mainWindow.tr("功能包更新"),
mainWindow.tr("{0} 将在下次启动时生效").format(info.label),
duration=5000,
position=InfoBarPosition.BOTTOM_RIGHT,
diff --git a/app/view/components/setting_cards.py b/app/view/components/setting_cards.py
index 1d5560db..fe0d7027 100644
--- a/app/view/components/setting_cards.py
+++ b/app/view/components/setting_cards.py
@@ -826,13 +826,14 @@ class RuntimeCard(SettingCard):
self.refreshButton.installEventFilter(ToolTipFilter(self.refreshButton))
def _initLayout(self) -> None:
- self.hBoxLayout.addWidget(self.installButton, 0, Qt.AlignmentFlag.AlignRight)
- self.hBoxLayout.addSpacing(8)
- self.hBoxLayout.addWidget(self.cancelButton, 0, Qt.AlignmentFlag.AlignRight)
- self.hBoxLayout.addSpacing(8)
- self.hBoxLayout.addWidget(self.refreshButton, 0, Qt.AlignmentFlag.AlignRight)
- self.hBoxLayout.addSpacing(8)
- self.hBoxLayout.addWidget(self.deleteButton, 0, Qt.AlignmentFlag.AlignRight)
+ self._buttonLayout = QHBoxLayout()
+ self._buttonLayout.setContentsMargins(0, 0, 0, 0)
+ self._buttonLayout.setSpacing(8)
+ self._buttonLayout.addWidget(self.installButton)
+ self._buttonLayout.addWidget(self.cancelButton)
+ self._buttonLayout.addWidget(self.refreshButton)
+ self._buttonLayout.addWidget(self.deleteButton)
+ self.hBoxLayout.addLayout(self._buttonLayout)
self.hBoxLayout.addSpacing(16)
def _bind(self) -> None:
diff --git a/app/view/pages/setting_page.py b/app/view/pages/setting_page.py
index b14bf75f..94572f6a 100644
--- a/app/view/pages/setting_page.py
+++ b/app/view/pages/setting_page.py
@@ -360,7 +360,7 @@ class SettingPage(ScrollArea):
7, self.openLogButton, 0, Qt.AlignmentFlag.AlignRight,
)
- self.packInfoCard = PushSettingCard(
+ self.packInfoCard = PrimaryPushSettingCard(
self.tr("查看详情"), FluentIcon.IOT, self.tr("功能包"),
self.tr("管理已安装的功能包"),
)
diff --git a/features/yt_dlp_pack/config.py b/features/yt_dlp_pack/config.py
index 9c3a266c..58e8fb1a 100644
--- a/features/yt_dlp_pack/config.py
+++ b/features/yt_dlp_pack/config.py
@@ -6,7 +6,7 @@ import sys
from pathlib import Path
from PySide6.QtCore import QCoreApplication, QT_TRANSLATE_NOOP as N, Qt
-from PySide6.QtWidgets import QWidget
+from PySide6.QtWidgets import QHBoxLayout, QWidget
from qfluentwidgets import (
BoolValidator, CaptionLabel, ConfigItem, FluentIcon, FolderValidator,
PushButton, SettingCard, ToolButton, ToolTipFilter,
@@ -318,9 +318,12 @@ class CookieSettingCard(SettingCard):
self._clearButton.installEventFilter(ToolTipFilter(self._clearButton))
self._clearButton.setVisible(hasCookieFile())
- self.hBoxLayout.addWidget(self._importButton, 0, Qt.AlignmentFlag.AlignRight)
- self.hBoxLayout.addSpacing(8)
- self.hBoxLayout.addWidget(self._clearButton, 0, Qt.AlignmentFlag.AlignRight)
+ buttonLayout = QHBoxLayout()
+ buttonLayout.setContentsMargins(0, 0, 0, 0)
+ buttonLayout.setSpacing(8)
+ buttonLayout.addWidget(self._importButton)
+ buttonLayout.addWidget(self._clearButton)
+ self.hBoxLayout.addLayout(buttonLayout)
self.hBoxLayout.addSpacing(16)
self._importButton.clicked.connect(self._onImportClicked)