The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
fix:修复低版本 Windows系统下的视觉问题 - 在 main_window.py 中添加对 Windows 8.1 及以下版本的特殊处理,隐藏标题栏按钮 - 在 pop_up_window.py 中根据操作系统版本调整背景颜色 - 由于没有现成的 Qt6ForWindows7 QtMultiMedia 库, 所以禁用 Win 10 以下的声音播放 - 优化了跨平台兼容性,确保在不同操作系统下的一致性
XiaoYouChRcf762bc25fad
diff --git a/app/view/main_window.py b/app/view/main_window.pyindex 8b1f4e8e..c4824959 100644--- a/app/view/main_window.py+++ b/app/view/main_window.py@@ -11,7 +11,7 @@ from PySide6.QtWidgets import QApplication, QGraphicsOpacityEffectfrom loguru import loggerfrom qfluentwidgets import FluentIcon as FIF, setTheme, Theme, themeColorfrom qfluentwidgets import NavigationItemPosition, MSFluentWindow, SplashScreen-from qframelesswindow.utils.win32_utils import isGreaterEqualWin10+from qframelesswindow.utils.win32_utils import isGreaterEqualWin10, isGreaterEqualWin8_1from .setting_interface import SettingInterfacefrom .task_interface import TaskInterface@@ -212,9 +212,17 @@ class MainWindow(MSFluentWindow):self._isMicaEnabled = Trueself.windowEffect.setAeroEffect(self.winId())self.setStyleSheet("background-color: transparent")+ if not isGreaterEqualWin8_1():+ self.titleBar.closeBtn.hide()+ self.titleBar.minBtn.hide()+ self.titleBar.maxBtn.hide()elif cfg.backgroundEffect.value == 'None':self._isMicaEnabled = Falseself.setStyleSheet("")+ if not isGreaterEqualWin8_1():+ self.titleBar.closeBtn.show()+ self.titleBar.minBtn.show()+ self.titleBar.maxBtn.show()def initNavigation(self):# add navigation itemsdiff --git a/app/view/pop_up_window.py b/app/view/pop_up_window.pyindex 73373224..304c8ef6 100644--- a/app/view/pop_up_window.py+++ b/app/view/pop_up_window.py@@ -1,13 +1,14 @@+import sysfrom os.path import dirname, basenamefrom PySide6.QtCore import Qt, QUrl, QTimer, QEasingCurve, QPropertyAnimation, QRect, QFileInfo, QObject, \QCoreApplicationfrom PySide6.QtGui import QPixmap, QPainter, QColor, QPainterPath-from PySide6.QtMultimedia import QSoundEffectfrom PySide6.QtWidgets import QWidget, QFileIconProvider, QPushButton, QToolButtonfrom qfluentwidgets import FluentIcon as FIFfrom qfluentwidgets.common.screen import getCurrentScreenGeometryfrom qframelesswindow import WindowEffect+from qframelesswindow.utils.win32_utils import isGreaterEqualWin10from app.common.methods import openFile, bringWindowToTop, isAbleToShowToastfrom app.view.Ui_PopUpWindow import Ui_PopUpWindow@@ -96,7 +97,10 @@ class PopUpWindowBase(QWidget, Ui_PopUpWindow):# 解决鼠标穿透问题paint = QPainter(self)paint.setPen(Qt.transparent)- paint.setBrush(QColor(0, 0, 0, 1))+ if isGreaterEqualWin10() or sys.platform == "darwin":+ paint.setBrush(QColor(0, 0, 0, 1))+ else:+ paint.setBrush(Qt.white)paint.drawPath(self.globalPath)super().paintEvent(e)@@ -113,10 +117,12 @@ class PopUpWindowBase(QWidget, Ui_PopUpWindow):def _playSound(self):# 设置音效- self.soundEffect = QSoundEffect(self)- self.soundEffect.setSource(QUrl.fromLocalFile(r":/res/completed_task.wav"))- self.soundEffect.setVolume(100)- self.soundEffect.play()+ if isGreaterEqualWin10():+ from PySide6.QtMultimedia import QSoundEffect+ self.soundEffect = QSoundEffect(self)+ self.soundEffect.setSource(QUrl.fromLocalFile(r":/res/completed_task.wav"))+ self.soundEffect.setVolume(100)+ self.soundEffect.play()def __moveIn(self):@@ -266,10 +272,12 @@ class ReceivedPopUpWindow(PopUpWindowBase):def _playSound(self):# 设置音效- self.soundEffect = QSoundEffect(self)- self.soundEffect.setSource(QUrl.fromLocalFile(r":/res/received_info.wav"))- self.soundEffect.setVolume(100)- self.soundEffect.play()+ if isGreaterEqualWin10():+ from PySide6.QtMultimedia import QSoundEffect+ self.soundEffect = QSoundEffect(self)+ self.soundEffect.setSource(QUrl.fromLocalFile(r":/res/received_info.wav"))+ self.soundEffect.setVolume(100)+ self.soundEffect.play()@classmethoddef showPopUpWindow(cls, receiveContent:str, mainWindow=None):