From 885b77468b7c79f5fae1e6c37b3923ae82341691 Mon Sep 17 00:00:00 2001 From: liuminghang Date: Mon, 5 Jul 2021 16:47:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug85738?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: 识别的图标居中,文字居中 Log: 识别的图标居中,文字居中 Bug: https://pms.uniontech.com/zentao/bug-view-85738.html Change-Id: Id24f60d5a691061af0533e25e343798fdbfd5f01 --- src/mainwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 0994c17..d4a675f 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -284,12 +284,14 @@ void MainWidget::loadingUi() if (m_loadingWidget && m_loadingTip && m_resultWidget) { int x = this->width() - m_resultWidget->width() / 2; int y = this->height() / 2 - 50; - m_loadingWidget->move(x, y); + qDebug() << m_loadingWidget->width(); + m_loadingWidget->setFixedSize(QSize(24, 24)); + m_loadingWidget->move(x - m_loadingWidget->width() / 2, y); qDebug() << m_loadingTip->width(); // m_loadingTip->setAlignment(Qt::AlignCenter); QFontMetrics fm(DFontSizeManager::instance()->get(DFontSizeManager::T8)); int mPoint = fm.boundingRect(tr("Recognizing")).width(); - m_loadingTip->move(x - mPoint / 2 + 7, y + 24); + m_loadingTip->move(x - mPoint / 2 - 4, y + 24); } if (m_pwidget) { m_pwidget->setFixedSize(this->width(), this->height() - 48);