From 9668a5023ce356dd09870a4f7d91dffe81abc209 Mon Sep 17 00:00:00 2001 From: fengli Date: Fri, 23 Feb 2024 14:21:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=AB=E6=8D=B7=E9=9D=A2=E6=9D=BFtips?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 快捷面板tips交互优化 Log: 快捷面板tips交互优化 Bug: https://pms.uniontech.com/bug-view-243721.html --- deepin-system-monitor-plugin/gui/quickpanelwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deepin-system-monitor-plugin/gui/quickpanelwidget.cpp b/deepin-system-monitor-plugin/gui/quickpanelwidget.cpp index 3bd7810d..4fa6887e 100644 --- a/deepin-system-monitor-plugin/gui/quickpanelwidget.cpp +++ b/deepin-system-monitor-plugin/gui/quickpanelwidget.cpp @@ -9,6 +9,7 @@ #include #include #include +#include QuickPanelWidget::QuickPanelWidget(QWidget* parent) @@ -30,6 +31,9 @@ void QuickPanelWidget::initUI() m_icon->setFixedSize(QSize(24, 24)); m_description->setElideMode(Qt::ElideRight); +#ifdef DTKWIDGET_CLASS_DToolTip + DToolTip::setToolTipShowMode(m_description, DToolTip::ShowWhenElided); +#endif DFontSizeManager::instance()->bind(m_description, DFontSizeManager::T10); auto layout = new QVBoxLayout; @@ -52,7 +56,6 @@ void QuickPanelWidget::setIcon(const QIcon &icon) void QuickPanelWidget::setDescription(const QString &description) { m_description->setText(description); - m_description->setToolTip(description); } void QuickPanelWidget::setWidgetState(WidgetState state)