Skip to content

Commit

Permalink
fix: 快捷面板tips交互优化
Browse files Browse the repository at this point in the history
快捷面板tips交互优化

Log: 快捷面板tips交互优化

Bug: https://pms.uniontech.com/bug-view-243721.html
  • Loading branch information
feeengli committed Feb 26, 2024
1 parent 8aedf80 commit 9668a50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deepin-system-monitor-plugin/gui/quickpanelwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <DFontSizeManager>
#include <DGuiApplicationHelper>
#include <DPalette>
#include <DToolTip>


QuickPanelWidget::QuickPanelWidget(QWidget* parent)
Expand All @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 9668a50

Please sign in to comment.