feat(ui): 优化统计列表,支持上下滑动

This commit is contained in:
DLmaster361
2025-08-02 10:42:17 +08:00
parent 2c0e457976
commit 0755d34903
4 changed files with 50 additions and 12 deletions

View File

@@ -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):
"""设置卡二级菜单弹出组件"""