Merge branch 'y2209bug' into 'dbus-interface'
ui间距调整 bug 141204 140441 143412 See merge request kylin-desktop/kylin-nm!726
This commit is contained in:
commit
4ffa0eb4fe
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
|
||||
#define ICON_SIZE 16,16
|
||||
|
||||
FirewallDialog::FirewallDialog(KDialog *parent)
|
||||
FirewallDialog::FirewallDialog(QWidget *parent): KDialog(parent)
|
||||
{
|
||||
initUI();
|
||||
this->setWindowIcon(QIcon::fromTheme("kylin-network"));
|
||||
this->setFixedSize(480, 204);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
centerToScreen();
|
||||
// centerToScreen();
|
||||
}
|
||||
|
||||
FirewallDialog::~FirewallDialog()
|
||||
|
|
|
@ -35,15 +35,17 @@ class FirewallDialog : public KDialog
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FirewallDialog(KDialog *parent = nullptr);
|
||||
FirewallDialog(QWidget *parent = nullptr);
|
||||
~FirewallDialog();
|
||||
void setUuid(QString uuid) {
|
||||
m_uuid = uuid;
|
||||
}
|
||||
|
||||
void centerToScreen();
|
||||
|
||||
private:
|
||||
void initUI();
|
||||
void centerToScreen();
|
||||
|
||||
QString m_uuid;
|
||||
QLabel * m_iconLabel = nullptr;
|
||||
QLabel * m_contentLabel = nullptr;
|
||||
|
|
|
@ -938,6 +938,8 @@ void LanPage::onConnectionStateChange(QString uuid,
|
|||
connect(m_activeResourse, &KyActiveConnectResourse::stateChangeReason, fireWallDialog, &FirewallDialog::closeMyself);
|
||||
|
||||
fireWallDialog->show();
|
||||
fireWallDialog->centerToScreen();
|
||||
|
||||
} else if (configType == KSC_FIREWALL_PUBLIC) {
|
||||
NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, deviceName, ssid, KSC_FIREWALL_PUBLIC);
|
||||
} else if (configType == KSC_FIREWALL_PRIVATE) {
|
||||
|
|
|
@ -992,6 +992,7 @@ void WlanPage::onConnectionStateChanged(QString uuid,
|
|||
connect(m_activatedConnectResource, &KyActiveConnectResourse::stateChangeReason, fireWallDialog, &FirewallDialog::closeMyself);
|
||||
|
||||
fireWallDialog->show();
|
||||
fireWallDialog->centerToScreen();
|
||||
|
||||
} else if (configType == KSC_FIREWALL_PUBLIC) {
|
||||
NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, devName, ssid, KSC_FIREWALL_PUBLIC);
|
||||
|
|
Loading…
Reference in New Issue