File tree Expand file tree Collapse file tree
plugins/dde-dock/bluetooth/componments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,8 +357,10 @@ void BluetoothApplet::updateSize()
357357 m_disableWidget->isVisibleTo (this ) ? m_disableWidget->setFixedHeight (height - settingHeight - adapterHeight) : m_disableWidget->setFixedHeight (0 );
358358
359359 // 设置滚动区高度
360- m_scrollArea->setFixedHeight (height - settingHeight - m_disableWidget->height () - m_airplaneModeWidget->height ());
361- m_contentWidget->setMinimumHeight (adapterHeight);
360+ const int scrollAreaHeight = height - settingHeight - m_disableWidget->height () - m_airplaneModeWidget->height ();
361+ m_scrollArea->setFixedHeight (scrollAreaHeight);
362+ // 确保内容控件高度至少等于适配器高度,并且不会超过滚动区域的高度太多
363+ m_contentWidget->setMinimumHeight (qMax (adapterHeight, scrollAreaHeight));
362364
363365 // top and bottom margin
364366 height += hMargins;
You can’t perform that action at this time.
0 commit comments