From 31c1ae217465ffdb293e1b9388d4605162f467c1 Mon Sep 17 00:00:00 2001 From: wjyrich Date: Thu, 28 Aug 2025 11:44:44 +0800 Subject: [PATCH] style: adjust bluetooth adapter item layout margins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Set contents margins to 0 for myDeviceLayout to remove extra spacing 2. Reduced spacing between myDeviceWidget and otherDeviceListView from 5 to 4 pixels 3. These changes improve visual consistency and reduce unnecessary whitespace 4. Maintains proper spacing while optimizing the UI layout style: 调整蓝牙适配器项布局边距 1. 将 myDeviceLayout 的内容边距设置为 0 以移除额外间距 2. 将 myDeviceWidget 和 otherDeviceListView 之间的间距从 5 像素减少到 4 像素 3. 这些更改提高了视觉一致性并减少了不必要的空白 4. 在优化 UI 布局的同时保持适当的间距 Pms: BUG-311109 --- .../dde-dock/bluetooth/componments/bluetoothadapteritem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp b/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp index b6cdf514a..665f3e61b 100644 --- a/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp +++ b/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp @@ -360,6 +360,7 @@ void BluetoothAdapterItem::initUi() m_myDeviceListView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QVBoxLayout *myDeviceLayout = new QVBoxLayout(m_myDeviceWidget); myDeviceLayout->setSpacing(0); + myDeviceLayout->setContentsMargins(0, 0, 0, 0); m_myDeviceLabel->setContentsMargins(10, 0, 0, 2); DFontSizeManager::instance()->bind(m_myDeviceLabel, DFontSizeManager::T10); myDeviceLayout->addWidget(m_myDeviceLabel); @@ -381,7 +382,7 @@ void BluetoothAdapterItem::initUi() mainLayout->addLayout(m_adapterLayout); mainLayout->addWidget(m_myDeviceWidget); - mainLayout->addSpacing(5); + mainLayout->addSpacing(4); mainLayout->addWidget(m_otherDeviceListView); mainLayout->addStretch();