From 9675e09f576b12a1bc0683eeb1379bffcc3354e2 Mon Sep 17 00:00:00 2001 From: zhaoyingzhen Date: Thu, 4 Sep 2025 10:51:47 +0800 Subject: [PATCH] fix: UserFrameList can display normally as tittle Log: as title Pms: BUG-332111 --- src/session-widgets/userframelist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/session-widgets/userframelist.cpp b/src/session-widgets/userframelist.cpp index 33bf438e..685a7c1f 100644 --- a/src/session-widgets/userframelist.cpp +++ b/src/session-widgets/userframelist.cpp @@ -273,9 +273,12 @@ void UserFrameList::updateLayout(int width) if (countWidth > 0) { if (m_flowLayout->count() <= count) { m_scrollArea->setFixedSize(countWidth, userWidgetHeight + 20); + // 单行用户时,限制高度避免滚动条 m_centerWidget->setMaximumHeight(m_scrollArea->height()); } else { m_scrollArea->setFixedSize(countWidth, (userWidgetHeight + UserFrameSpacing) * 2); + // 多行用户时,清除高度限制,让内容自适应以支持滚动 + m_centerWidget->setMaximumHeight(QWIDGETSIZE_MAX); } m_centerWidget->setFixedWidth(m_scrollArea->width() - 10);