fix(同步主线最新代码): 同步主线最新代码

Description: 无

Log: 无
This commit is contained in:
liudun 2023-04-27 11:36:44 +08:00
parent 6f21587497
commit 0f1227ab2d
9 changed files with 2328 additions and 2343 deletions

View File

@ -825,7 +825,7 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="../src/inputdialog.cpp" line="54"/>
<source>Duplicate feature name</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../src/inputdialog.cpp" line="56"/>
@ -835,7 +835,7 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="../src/inputdialog.cpp" line="58"/>
<source>Empty feature name</source>
<translation></translation>
<translation></translation>
</message>
</context>
<context>
@ -1269,7 +1269,12 @@ p, li { white-space: pre-wrap; }
<translation></translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="568"/>
<location filename="../src/mainwindow.cpp" line="358"/>
<source>Close</source>
<translation></translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="483"/>
<source>Restart Service</source>
<translation></translation>
</message>

View File

@ -79,8 +79,6 @@ MainWindow::MainWindow(QString usernameFromCmd, QWidget *parent) :
ui->setupUi(this);
this->setCentralWidget(ui->centralWidget);// 设置centralWidget不然设置主窗口布局会有问题
prettify();
initialize();
@ -117,6 +115,7 @@ MainWindow::MainWindow(QString usernameFromCmd, QWidget *parent) :
m_curStyle = m_styleSettings->get("styleName").toString();
connect(m_styleSettings, &QGSettings::changed,
this, &MainWindow::onConfigurationChanged);
setCurStyleSheet();
}
MainWindow::~MainWindow()
@ -136,6 +135,7 @@ void MainWindow::onConfigurationChanged(QString key)
if(key == "styleName"){
m_curStyle = m_styleSettings->get("styleName").toString();
initPermissionWidget();
setCurStyleSheet();
}
}
@ -170,6 +170,35 @@ void MainWindow::initPerwgtSize()
});
}
void MainWindow::setCurStyleSheet()
{
if (m_curStyle == "ukui-dark" || m_curStyle == "ukui-black") {
permissionLabel->setStyleSheet("background-color: black; border-radius: 8px;border: 1px solid #404040;");
systemLabel->setStyleSheet("background-color: black;border-bottom-left-radius: 8px;border-bottom-right-radius: 8px;border: 1px solid #404040;");
saverLabel->setStyleSheet("background-color: black;border-style:solid;border-left-width: 1px; border-color:#404040;border-right-width: 1px;");
greetLabel->setStyleSheet("background-color: black;border-top-left-radius: 8px;border-top-right-radius: 8px;border: 1px solid #404040;");
QPixmap noDeviceIcon;
noDeviceIcon.load(":/images/assets/dark-no-device.svg");
ui->lblNoDeviceIFace->setPixmap(noDeviceIcon);
ui->lblNoDeviceIFingerPrint->setPixmap(noDeviceIcon);
ui->lblNoDeviceIFingerVein->setPixmap(noDeviceIcon);
ui->lblNoDeviceIIris->setPixmap(noDeviceIcon);
ui->lblNoDeviceIVoicePrint->setPixmap(noDeviceIcon);
} else {
permissionLabel->setStyleSheet("background-color: white; border-radius: 8px;border: 1px solid #E7E7E7;");
systemLabel->setStyleSheet("background-color: white;border-bottom-left-radius: 8px;border-bottom-right-radius: 8px;border: 1px solid #E7E7E7;");
saverLabel->setStyleSheet("background-color: white;border-style:solid;border-left-width: 1px; border-color:#E7E7E7;border-right-width: 1px;");
greetLabel->setStyleSheet("background-color: white;border-top-left-radius: 8px;border-top-right-radius: 8px;border: 1px solid #E7E7E7;");
QPixmap noDeviceIcon;
noDeviceIcon.load(":/images/assets/no-device.svg");
ui->lblNoDeviceIFace->setPixmap(noDeviceIcon);
ui->lblNoDeviceIFingerPrint->setPixmap(noDeviceIcon);
ui->lblNoDeviceIFingerVein->setPixmap(noDeviceIcon);
ui->lblNoDeviceIIris->setPixmap(noDeviceIcon);
ui->lblNoDeviceIVoicePrint->setPixmap(noDeviceIcon);
}
}
void MainWindow::resizeEvent(QResizeEvent *event)
{
if (isPermissionWidget) {

View File

@ -92,6 +92,7 @@ private slots:
void onDefaultDeviceChanged(bool checked);
bool changeDeviceStatus(DeviceInfo *deviceInfo, KSwitchButton* switchBtn);
void onUSBDeviceHotPlug(int, int, int);
void setCurStyleSheet();
void onConfigurationChanged(QString key);
void onUpdateDevice(int,int,int);
void onDeleteFeatureState(int nState);

File diff suppressed because it is too large Load Diff

View File

@ -812,6 +812,8 @@ void PromptDialog::showClosePrompt(QString tips)
w_timer->stop();
}
ui->msgLabel->setText(tips);
ui->msgLabel->setWordWrap(true);
ui->msgLabel->adjustSize();
ui->msgLabel->show();
ui->Fsbtn->setText(tr("Finish"));
ui->Fsbtn->show();

View File

@ -244,6 +244,9 @@
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>

View File

@ -93,6 +93,9 @@ void BiometricsWidget::initBioComonent()
connect(ui->biometricDeviceBox_2, SIGNAL(currentIndexChanged(int)),
this, SLOT(onbiometricDeviceBoxCurrentIndexChanged(int)));
ui->toolButton->setProperty("isWindowButton", 0x1);
ui->toolButton->setProperty("useIconHighlightEffect", 0x2);
ui->toolButton->setIcon(QIcon::fromTheme("view-more-horizontal-symbolic"));
menu = new QMenu();
QAction *installAction = new QAction(tr("Advanced Settings"), this);

View File

@ -573,27 +573,27 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changepwddialog.ui" line="130"/>
<source>Change Pwd</source>
<translation>Pwdལ</translation>
<translation></translation>
</message>
<message>
<location filename="../changepwddialog.ui" line="317"/>
<source>Pwd type</source>
<translation>Pwdརིགས</translation>
<translation></translation>
</message>
<message>
<location filename="../changepwddialog.ui" line="395"/>
<source>Cur pwd</source>
<translation>pwd</translation>
<translation></translation>
</message>
<message>
<location filename="../changepwddialog.ui" line="440"/>
<source>New pwd</source>
<translation>pwdགས</translation>
<translation></translation>
</message>
<message>
<location filename="../changepwddialog.ui" line="485"/>
<source>New pwd sure</source>
<translation>pwdགཏན</translation>
<translation></translation>
</message>
<message>
<location filename="../changepwddialog.ui" line="605"/>
@ -608,7 +608,7 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changepwddialog.cpp" line="64"/>
<source>Change pwd</source>
<translation>pwd </translation>
<translation></translation>
</message>
<message>
<source>Cur pwd checking!</source>
@ -655,7 +655,7 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changepwddialog.cpp" line="329"/>
<source>Same with old pwd</source>
<translation>pwdད</translation>
<translation></translation>
</message>
<message>
<source>Password length needs to more than %1 character!</source>
@ -673,7 +673,7 @@ Please authenticate yourself to continue</source>
<location filename="../changepwddialog.cpp" line="245"/>
<location filename="../changepwddialog.cpp" line="365"/>
<source>Inconsistency with pwd</source>
<translation>pwdད</translation>
<translation></translation>
</message>
</context>
<context>
@ -696,7 +696,7 @@ Please authenticate yourself to continue</source>
<location filename="../changeuserpwd.cpp" line="124"/>
<location filename="../changeuserpwd.cpp" line="628"/>
<source>Current Pwd</source>
<translation>Pwd</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="156"/>
@ -704,7 +704,7 @@ Please authenticate yourself to continue</source>
<location filename="../changeuserpwd.cpp" line="629"/>
<location filename="../changeuserpwd.cpp" line="637"/>
<source>New Pwd</source>
<translation>Pwdགས</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="197"/>
@ -712,7 +712,7 @@ Please authenticate yourself to continue</source>
<location filename="../changeuserpwd.cpp" line="630"/>
<location filename="../changeuserpwd.cpp" line="638"/>
<source>Sure Pwd</source>
<translation>Pwd</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="260"/>
@ -729,7 +729,7 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changeuserpwd.cpp" line="444"/>
<source>Same with old pwd</source>
<translation type="unfinished">pwdད</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="500"/>
@ -744,7 +744,7 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changeuserpwd.cpp" line="825"/>
<source>current pwd cannot be empty!</source>
<translation>pwdནི</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="830"/>
@ -754,13 +754,13 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changeuserpwd.cpp" line="835"/>
<source>sure pwd cannot be empty!</source>
<translation>pwdནི</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="373"/>
<location filename="../changeuserpwd.cpp" line="714"/>
<source>Inconsistency with pwd</source>
<translation>pwdད</translation>
<translation></translation>
</message>
<message>
<location filename="../changeuserpwd.cpp" line="663"/>

View File

@ -34,7 +34,7 @@
<message>
<location filename="../biometricenroll.cpp" line="156"/>
<source>Close</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../biometricenroll.cpp" line="209"/>
@ -532,12 +532,12 @@ Please authenticate yourself to continue</source>
<message>
<location filename="../changefeaturename.cpp" line="34"/>
<source>Please do not use spaces as the beginning or end of the feature name</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../changefeaturename.cpp" line="36"/>
<source>Empty feature name</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../changefeaturename.cpp" line="38"/>