fix(ui): Style of button is abrupt in high transparecy.
Description: 修复透明度高时按钮样式突兀的问题 Log: 修复透明度高时按钮样式突兀的问题 Bug: http://pm.kylin.com/biz/bug-view-31245.html
This commit is contained in:
parent
afc47aee93
commit
236ab3b28d
|
@ -289,6 +289,12 @@ void WpaWifiDialog::initUI() {
|
|||
buttonLyt->addWidget(connectBtn);
|
||||
buttonFrame->setLayout(buttonLyt);
|
||||
|
||||
QString btnOffQss = "QPushButton{border:0px;border-radius:4px;background-color:rgba(255,255,255,0.12);color:white;font-size:14px;}"
|
||||
"QPushButton:Hover{border:0px solid rgba(255,255,255,0.2);border-radius:4px;background-color:rgba(107,142,235,1);}"
|
||||
"QPushButton:Pressed{border-radius:4px;background-color:rgba(50,87,202,1);";
|
||||
cancelBtn->setStyleSheet(btnOffQss);
|
||||
connectBtn->setStyleSheet(btnOffQss);
|
||||
|
||||
nameEditor->setContextMenuPolicy(Qt::NoContextMenu); //禁止LineEdit的右键菜单
|
||||
userEditor->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
pwdEditor->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
|
|
|
@ -66,6 +66,8 @@ DlgHideWifi::DlgHideWifi(int type, MainWindow *mainWindow, QWidget *parent) :
|
|||
ui->lbSecurity->setText(tr("Wi-Fi security")); //Wi-Fi安全性:
|
||||
ui->btnCancel->setText(tr("Cancel")); //取消
|
||||
ui->btnConnect->setText(tr("Connect")); //连接
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
|
||||
ui->cbxConn->clear();
|
||||
ui->cbxConn->addItem(tr("C_reate…")); //新建...
|
||||
|
|
|
@ -77,8 +77,8 @@ DlgHideWifiEapFast::DlgHideWifiEapFast(int type, QWidget *parent) :
|
|||
ui->lePassword->setStyleSheet(objQss.leQss);
|
||||
ui->checkBoxPwd->setStyleSheet(objQss.checkBoxQss);
|
||||
|
||||
ui->btnCancel->setStyleSheet(objQss.btnCancelQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnConnQss);
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
ui->lineUp->setStyleSheet(objQss.lineQss);
|
||||
ui->lineDown->setStyleSheet(objQss.lineQss);
|
||||
|
||||
|
|
|
@ -67,8 +67,8 @@ DlgHideWifiEapLeap::DlgHideWifiEapLeap(int type, QWidget *parent) :
|
|||
ui->lePassword->setStyleSheet(objQss.leQss);
|
||||
ui->checkBox->setStyleSheet(objQss.checkBoxQss);
|
||||
|
||||
ui->btnCancel->setStyleSheet(objQss.btnCancelQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnConnQss);
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
ui->lineUp->setStyleSheet(objQss.lineQss);
|
||||
ui->lineDown->setStyleSheet(objQss.lineQss);
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ DlgHideWifiEapPeap::DlgHideWifiEapPeap(int type, int beUsed, MainWindow *mainWin
|
|||
ui->lbPassword->setText(tr("Password")); //密码:
|
||||
ui->btnCancel->setText(tr("Cancel")); //取消
|
||||
ui->btnConnect->setText(tr("Connect")); //连接
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
|
||||
ui->cbxConn->addItem("新建...");
|
||||
int status = system("nmcli connection show>/tmp/kylin-nm-connshow");
|
||||
|
|
|
@ -67,8 +67,8 @@ DlgHideWifiEapPwd::DlgHideWifiEapPwd(int type, QWidget *parent) :
|
|||
ui->lePassword->setStyleSheet(objQss.leQss);
|
||||
ui->checkBox->setStyleSheet(objQss.checkBoxQss);
|
||||
|
||||
ui->btnCancel->setStyleSheet(objQss.btnCancelQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnConnQss);
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
ui->lineUp->setStyleSheet(objQss.lineQss);
|
||||
ui->lineDown->setStyleSheet(objQss.lineQss);
|
||||
|
||||
|
|
|
@ -74,6 +74,8 @@ DlgHideWifiEapTls::DlgHideWifiEapTls(int type, int beUsed, MainWindow *mainWindo
|
|||
ui->lbUserKeyPwd->setText(tr("User key password")); //用户密钥密码:
|
||||
ui->btnCancel->setText(tr("Cancel")); //取消
|
||||
ui->btnConnect->setText(tr("Connect")); //连接
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
|
||||
ui->cbxConn->addItem(tr("C_reate…")); //新建...
|
||||
int status = system("nmcli connection show>/tmp/kylin-nm-connshow");
|
||||
|
|
|
@ -81,8 +81,8 @@ DlgHideWifiEapTTLS::DlgHideWifiEapTTLS(int type, QWidget *parent) :
|
|||
ui->lePassword->setStyleSheet(objQss.leQss);
|
||||
ui->checkBoxPwdSec->setStyleSheet(objQss.checkBoxQss);
|
||||
|
||||
ui->btnCancel->setStyleSheet(objQss.btnCancelQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnConnQss);
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
ui->lineUp->setStyleSheet(objQss.lineQss);
|
||||
ui->lineDown->setStyleSheet(objQss.lineQss);
|
||||
ui->checkBoxCA->setFocusPolicy(Qt::NoFocus);
|
||||
|
|
|
@ -62,8 +62,8 @@ DlgHideWifiLeap::DlgHideWifiLeap(QWidget *parent) :
|
|||
ui->cbxSecurity->setView(new QListView());
|
||||
ui->checkBoxPwd->setStyleSheet(objQss.checkBoxQss);
|
||||
|
||||
ui->btnCancel->setStyleSheet(objQss.btnCancelQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnConnQss);
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
ui->lineUp->setStyleSheet(objQss.lineQss);
|
||||
ui->lineDown->setStyleSheet(objQss.lineQss);
|
||||
|
||||
|
|
|
@ -67,8 +67,8 @@ DlgHideWifiWep::DlgHideWifiWep(int type, QWidget *parent) :
|
|||
ui->cbxAuth->setStyleSheet(objQss.cbxQss);
|
||||
ui->cbxAuth->setView(new QListView());
|
||||
|
||||
ui->btnCancel->setStyleSheet(objQss.btnCancelQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnConnQss);
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
ui->lineUp->setStyleSheet(objQss.lineQss);
|
||||
ui->lineDown->setStyleSheet(objQss.lineQss);
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ DlgHideWifiWpa::DlgHideWifiWpa(int type, MainWindow *mainWindow, QWidget *parent
|
|||
ui->lbPassword->setText(tr("Password")); //密码:
|
||||
ui->btnCancel->setText(tr("Cancel")); //取消
|
||||
ui->btnConnect->setText(tr("Connect")); //连接
|
||||
ui->btnCancel->setStyleSheet(objQss.btnOffQss);
|
||||
ui->btnConnect->setStyleSheet(objQss.btnOffQss);
|
||||
|
||||
ui->cbxConn->addItem(tr("C_reate…")); //新建...
|
||||
KylinDBus mkylindbus;
|
||||
|
|
|
@ -41,4 +41,8 @@ MyQss::MyQss()
|
|||
"QPushButton:Hover{border:0px solid rgba(255,255,255,0.2);border-radius:4px;background-color:rgba(107,142,235,1);}"
|
||||
"QPushButton:Pressed{border-radius:4px;background-color:rgba(50,87,202,1);}";
|
||||
lineQss = "background:rgba(156,156,156,0.1);";
|
||||
|
||||
btnOffQss = "QPushButton{border:0px;border-radius:4px;background-color:rgba(255,255,255,0.12);color:white;font-size:14px;}"
|
||||
"QPushButton:Hover{border:0px solid rgba(255,255,255,0.2);border-radius:4px;background-color:rgba(107,142,235,1);}"
|
||||
"QPushButton:Pressed{border-radius:4px;background-color:rgba(50,87,202,1);";
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class MyQss
|
|||
public:
|
||||
MyQss();
|
||||
|
||||
QString labelQss, cbxQss, leQss, btnConnQss, btnCancelQss, lineQss, checkBoxQss, checkBoxCAQss;
|
||||
QString labelQss, cbxQss, leQss, btnConnQss, btnCancelQss, lineQss, checkBoxQss, checkBoxCAQss, btnOffQss;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue