diff --git a/app/core/config.py b/app/core/config.py index d734263..a038e9f 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -704,7 +704,7 @@ class GeneralSubConfig(LQConfig): class AppConfig(GlobalConfig): - VERSION = "4.4.1.0" + VERSION = "4.4.2.1" stage_refreshed = Signal() PASSWORD_refreshed = Signal() diff --git a/app/ui/Widget.py b/app/ui/Widget.py index 7af06f5..d7d5390 100644 --- a/app/ui/Widget.py +++ b/app/ui/Widget.py @@ -281,9 +281,9 @@ class NoticeMessageBox(MessageBoxBase): super().__init__(parent) self.setTitle(title) - self.Layout = QVBoxLayout() - self.viewLayout.addLayout(self.Layout) - self.viewLayout.setContentsMargins(3, 0, 3, 3) + content_widget = QWidget() + self.Layout = QVBoxLayout(content_widget) + self.Layout.setContentsMargins(0, 0, 11, 0) self.index_cards: List[QuantifiedItemCard] = [] @@ -301,6 +301,16 @@ class NoticeMessageBox(MessageBoxBase): self.Layout.addStretch(1) + scrollArea = ScrollArea() + scrollArea.setWidgetResizable(True) + scrollArea.setContentsMargins(0, 0, 0, 0) + scrollArea.setStyleSheet("background: transparent; border: none;") + scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + scrollArea.setWidget(content_widget) + + self.viewLayout.addWidget(scrollArea) + self.viewLayout.setContentsMargins(3, 0, 3, 3) + class SettingFlyoutView(FlyoutViewBase): """设置卡二级菜单弹出组件""" diff --git a/app/ui/history.py b/app/ui/history.py index d0d45b3..af59736 100644 --- a/app/ui/history.py +++ b/app/ui/history.py @@ -41,7 +41,7 @@ from qfluentwidgets import ( ZhDatePicker, SubtitleLabel, ) -from PySide6.QtCore import Signal, QDate +from PySide6.QtCore import Signal, QDate, Qt import os import subprocess from datetime import datetime, timedelta @@ -330,10 +330,11 @@ class History(QWidget): def __init__(self, history_list: List[Path], parent=None): super().__init__(parent) self.setTitle("记录条目") + self.setFixedHeight(500) - self.Layout = QVBoxLayout() - self.viewLayout.addLayout(self.Layout) - self.viewLayout.setContentsMargins(3, 0, 3, 3) + content_widget = QWidget() + self.Layout = QVBoxLayout(content_widget) + self.Layout.setContentsMargins(0, 0, 11, 0) self.index_cards: List[StatefulItemCard] = [] @@ -352,16 +353,27 @@ class History(QWidget): self.Layout.addStretch(1) + scrollArea = ScrollArea() + scrollArea.setWidgetResizable(True) + scrollArea.setContentsMargins(0, 0, 0, 0) + scrollArea.setStyleSheet("background: transparent; border: none;") + scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + scrollArea.setWidget(content_widget) + + self.viewLayout.addWidget(scrollArea) + self.viewLayout.setContentsMargins(3, 0, 3, 3) + class StatisticsCard(HeaderCardWidget): """历史记录统计信息卡片组""" def __init__(self, name: str, item_list: list, parent=None): super().__init__(parent) self.setTitle(name) + self.setFixedHeight(500) - self.Layout = QVBoxLayout() - self.viewLayout.addLayout(self.Layout) - self.viewLayout.setContentsMargins(3, 0, 3, 3) + content_widget = QWidget() + self.Layout = QVBoxLayout(content_widget) + self.Layout.setContentsMargins(0, 0, 11, 0) self.item_cards: List[QuantifiedItemCard] = [] @@ -375,12 +387,23 @@ class History(QWidget): self.Layout.addStretch(1) + scrollArea = ScrollArea() + scrollArea.setWidgetResizable(True) + scrollArea.setContentsMargins(0, 0, 0, 0) + scrollArea.setStyleSheet("background: transparent; border: none;") + scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + scrollArea.setWidget(content_widget) + + self.viewLayout.addWidget(scrollArea) + self.viewLayout.setContentsMargins(3, 0, 3, 3) + class LogCard(HeaderCardWidget): """历史记录日志卡片""" def __init__(self, parent=None): super().__init__(parent) self.setTitle("日志") + self.setFixedHeight(500) self.text = TextBrowser(self) self.open_file = PushButton("打开日志文件", self) diff --git a/resources/version.json b/resources/version.json index 3d6eb9a..50a1d85 100644 --- a/resources/version.json +++ b/resources/version.json @@ -1,6 +1,11 @@ { - "main_version": "4.4.1.0", + "main_version": "4.4.2.1", "version_info": { + "4.4.2.1": { + "程序优化": [ + "优化统计列表,支持上下滑动" + ] + }, "4.4.1.0": { "新增功能": [ "启动时支持直接运行复数调度队列"