From cb3fbb5eac7db0cae166a5aad4809f2af973300e Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Thu, 13 Oct 2022 09:47:44 +0800 Subject: [PATCH] =?UTF-8?q?ui=E9=97=B4=E8=B7=9D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/netconnect/deviceframe.cpp | 2 +- plugins/netconnect/netconnect.cpp | 2 ++ plugins/wlanconnect/wlanconnect.cpp | 3 +++ src/frontend/list-items/listitem.cpp | 2 +- src/frontend/netdetails/netdetail.cpp | 3 ++- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/netconnect/deviceframe.cpp b/plugins/netconnect/deviceframe.cpp index 84a88f44..31a3ea5a 100644 --- a/plugins/netconnect/deviceframe.cpp +++ b/plugins/netconnect/deviceframe.cpp @@ -19,7 +19,7 @@ */ #include "deviceframe.h" -#define LAYOUT_MARGINS 18,0,24,0 +#define LAYOUT_MARGINS 16,0,16,0 #define FRAME_HEIGHT 58 #define RADIUS 6.0 diff --git a/plugins/netconnect/netconnect.cpp b/plugins/netconnect/netconnect.cpp index 09e13c25..877ac8de 100644 --- a/plugins/netconnect/netconnect.cpp +++ b/plugins/netconnect/netconnect.cpp @@ -180,8 +180,10 @@ bool NetConnect::eventFilter(QObject *w, QEvent *e) { void NetConnect::initComponent() { wiredSwitch = new KSwitchButton(pluginWidget); ui->openWIifLayout->addWidget(wiredSwitch); + ui->openWIifLayout->setContentsMargins(0,0,8,0); ui->detailLayOut->setContentsMargins(MAIN_LAYOUT_MARGINS); ui->verticalLayout_3->setContentsMargins(NO_MARGINS); + ui->verticalLayout_3->setSpacing(8); ui->availableLayout->setSpacing(SPACING); ui->horizontalLayout->setContentsMargins(TOP_MARGINS); diff --git a/plugins/wlanconnect/wlanconnect.cpp b/plugins/wlanconnect/wlanconnect.cpp index e6f132c0..24004b1f 100644 --- a/plugins/wlanconnect/wlanconnect.cpp +++ b/plugins/wlanconnect/wlanconnect.cpp @@ -173,6 +173,7 @@ QWidget *WlanConnect::pluginUi() { if(!m_interface->isValid()) { qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message()); } + initSearchText(); initComponent(); } return pluginWidget; @@ -238,8 +239,10 @@ bool WlanConnect::eventFilter(QObject *w, QEvent *e) { void WlanConnect::initComponent() { m_wifiSwitch = new KSwitchButton(pluginWidget); ui->openWIifLayout->addWidget(m_wifiSwitch); + ui->openWIifLayout->setContentsMargins(0,0,8,0); ui->detailLayOut_3->setContentsMargins(MAIN_LAYOUT_MARGINS); ui->verticalLayout_3->setContentsMargins(NO_MARGINS); + ui->verticalLayout_3->setSpacing(8); ui->availableLayout->setSpacing(SPACING); m_wifiSwitch->installEventFilter(this); diff --git a/src/frontend/list-items/listitem.cpp b/src/frontend/list-items/listitem.cpp index b7f70067..52b86ebd 100644 --- a/src/frontend/list-items/listitem.cpp +++ b/src/frontend/list-items/listitem.cpp @@ -22,7 +22,7 @@ #define MAIN_LAYOUT_MARGINS 0,0,0,0 #define MAIN_LAYOUT_SPACING 0 -#define ITEM_FRAME_MARGINS 12,4,16,4 +#define ITEM_FRAME_MARGINS 12,6,16,6 #define ITEM_FRAME_SPACING 8 #define FRAME_WIDTH 404 diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index 82942c8e..cf02dfd7 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -357,6 +357,7 @@ void NetDetail::initUI() } pageLayout->addWidget(m_netTabBar, Qt::AlignCenter); + pageLayout->addSpacing(24); // TabBar关联选项卡页面 connect(m_netTabBar, SIGNAL(currentChanged(int)), this, SLOT(currentRowChangeSlot(int))); @@ -371,7 +372,7 @@ void NetDetail::initUI() forgetBtn = new QPushButton(this); QVBoxLayout *centerlayout = new QVBoxLayout(centerWidget); - centerlayout->setContentsMargins(CENTER_LAYOUT_MARGINS); + centerlayout->setContentsMargins(CENTER_LAYOUT_MARGINS); // 右边距为0,为安全页滚动区域留出空间 centerlayout->addWidget(pageFrame); centerlayout->addSpacing(4); centerlayout->addWidget(stackWidget);