123177 【UKUI 3.1.4 走查】【设计】【备份还原】页面细节调整

This commit is contained in:
zhaominyong 2022-06-20 15:45:20 +08:00
parent 533a7d60b6
commit 2176afce7b
4 changed files with 20 additions and 6 deletions

View File

@ -1894,6 +1894,7 @@ void DataBackup::initLastWidget()
resultLogo->setVisible(true);
// 备份失败
bigTitle->setDeplayText(tr("The backup is failed"));
bigTitle->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
hlayoutCenterFont1->setAlignment(Qt::AlignLeft);
dot1->setVisible(true);
dot2->setVisible(true);

View File

@ -960,6 +960,7 @@ void DataRestore::initLastWidget()
resultLogo->setVisible(true);
// 数据还原失败
bigTitle->setDeplayText(tr("Restoring the data failed"));
bigTitle->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
dot1->setVisible(true);
dot2->setVisible(true);
labelError1->setVisible(true);

View File

@ -1039,7 +1039,7 @@ void GhostImage::initLastWidget()
bigTitle->setIsOriginal(true);
bigTitle->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
hlayoutCenterFont1->addWidget(bigTitle);
hlayoutCenterFont1->setAlignment(Qt::AlignLeft);
// hlayoutCenterFont1->setAlignment(Qt::AlignLeft);
vlayoutCenterFont->addLayout(hlayoutCenterFont1);
vlayoutCenterFont->addSpacing(16);
@ -1056,7 +1056,7 @@ void GhostImage::initLastWidget()
labelError1->adjustSize();
labelError1->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
hlayoutCenterFont2->addWidget(labelError1);
hlayoutCenterFont2->setAlignment(Qt::AlignLeft);
// hlayoutCenterFont2->setAlignment(Qt::AlignLeft);
vlayoutCenterFont->addLayout(hlayoutCenterFont2);
// 第三行
@ -1126,16 +1126,22 @@ void GhostImage::initLastWidget()
resultLogo->setVisible(true);
// 镜像制作成功
bigTitle->setDeplayText(tr("Ghost image creation is successful"));
QFontMetrics fontMetrics(bigTitle->font());
int fontSize = fontMetrics.width(bigTitle->getOriginalText());
bigTitle->setFixedWidth(fontSize);
hlayoutCenterFont1->setAlignment(Qt::AlignCenter);
QString imgPath = m_prefixDestPath + GHOST_PATH;
imgPath.replace("//", "/");
labelError1->setDeplayText(tr("You can view it in the directory : %1").arg(imgPath));
dot1->setVisible(true);
dot1->setVisible(false);
dot2->setVisible(false);
labelError1->setVisible(true);
labelError2->setVisible(false);
retry->setVisible(false);
labelError1->setAlignment(Qt::AlignCenter);
hlayoutCenterFont2->setAlignment(Qt::AlignCenter);
retry->setVisible(false);
homePage->setVisible(true);
} else {
QIcon icon = QIcon::fromTheme("dialog-error.png", QIcon(":/symbos/dialog-error.png"));
@ -1143,14 +1149,19 @@ void GhostImage::initLastWidget()
resultLogo->setVisible(true);
// 镜像制作失败
bigTitle->setDeplayText(tr("Ghost image creation is failed"));
bigTitle->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
hlayoutCenterFont1->setAlignment(Qt::AlignLeft);
dot1->setVisible(true);
dot2->setVisible(true);
labelError1->setVisible(true);
labelError2->setVisible(true);
labelError1->setDeplayText(errMsg);
labelError2->setDeplayText(errTip);
retry->setVisible(true);
labelError1->setAlignment(Qt::AlignLeft);
hlayoutCenterFont2->setAlignment(Qt::AlignLeft);
retry->setVisible(true);
homePage->setVisible(true);
}
});

View File

@ -1483,6 +1483,7 @@ void SystemBackup::initLastWidget()
resultLogo->setVisible(true);
// 备份失败
bigTitle->setDeplayText(tr("The backup is failed"));
bigTitle->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
hlayoutCenterFont1->setAlignment(Qt::AlignLeft);
dot1->setVisible(true);
dot2->setVisible(true);