Skip to content

Commit ce2921b

Browse files
deepin-ci-robotyixinshark
authored andcommitted
sync: from linuxdeepin/dde-session-shell
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#32
1 parent bc7c236 commit ce2921b

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)