Skip to content

Commit e3b40b9

Browse files
committed
fix: UserFrameList can display normally
as tittle Log: as title Pms: BUG-332111
1 parent 8765fb2 commit e3b40b9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/session-widgets/userframelist.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,12 @@ void UserFrameList::updateLayout(int width)
273273
if (countWidth > 0) {
274274
if (m_flowLayout->count() <= count) {
275275
m_scrollArea->setFixedSize(countWidth, userWidgetHeight + 20);
276+
// 单行用户时,限制高度避免滚动条
276277
m_centerWidget->setMaximumHeight(m_scrollArea->height());
277278
} else {
278279
m_scrollArea->setFixedSize(countWidth, (userWidgetHeight + UserFrameSpacing) * 2);
280+
// 多行用户时,清除高度限制,让内容自适应以支持滚动
281+
m_centerWidget->setMaximumHeight(QWIDGETSIZE_MAX);
279282
}
280283

281284
m_centerWidget->setFixedWidth(m_scrollArea->width() - 10);

0 commit comments

Comments
 (0)