From 02a1129b0bba701379b32ac0d1296cf475a196f7 Mon Sep 17 00:00:00 2001 From: chenwei Date: Fri, 22 Jan 2021 09:35:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=8F=E5=BA=94=E7=94=A8tips=E5=BC=B9=E7=AA=97=E8=BE=B9?= =?UTF-8?q?=E8=B7=9D=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据设计师要求将控件左右间距修改为10 Log: 任务栏应用tips弹窗左右间距修改为10 Bug: https://pms.uniontech.com/zentao/bug-view-61164.html Change-Id: I6353058b02c9e98cdf9f2a597713008a3aadb4f1 --- widgets/tipswidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/tipswidget.cpp b/widgets/tipswidget.cpp index 17f439212..16b5fb46f 100644 --- a/widgets/tipswidget.cpp +++ b/widgets/tipswidget.cpp @@ -21,7 +21,7 @@ void TipsWidget::setText(const QString &text) // 同时去掉两边的空白信息,例如qBittorrent的提示 m_text = document.toPlainText().simplified(); - setFixedSize(fontMetrics().width(m_text) + 6, fontMetrics().height()); + setFixedSize(fontMetrics().width(m_text) + 20, fontMetrics().height()); update(); @@ -42,7 +42,7 @@ void TipsWidget::setTextList(const QStringList &textList) int k = fontMetrics().height() * m_textList.size(); setFixedHeight(k); for (QString text : m_textList) { - int fontLength = fontMetrics().width(text) + 6; + int fontLength = fontMetrics().width(text) + 20; maxLength = maxLength > fontLength ? maxLength : fontLength; } m_width = maxLength;