Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/session-widgets/userframelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down