mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 修复第三方系统托盘的tooltip信息无法换行的问题
没有对第三方的提示信息做换行判断处理 Log: 修复了托盘的tooltip信息无法换行的问题 Bug: https://pms.uniontech.com/zentao/task-view-72845.html Change-Id: Idb93042be2e3a3521ae79f34e55d6d177af5ab74
This commit is contained in:
parent
4277b4a852
commit
d941a19a44
@ -85,12 +85,12 @@ private:
|
||||
QTimer *m_attentionDelayTimer;
|
||||
|
||||
TrayPlugin *m_trayPlugin;
|
||||
FashionTrayControlWidget *m_controlWidget;
|
||||
FashionTrayControlWidget *m_controlWidget; //展开按钮
|
||||
FashionTrayWidgetWrapper *m_currentDraggingTray;
|
||||
|
||||
NormalContainer *m_normalContainer;
|
||||
NormalContainer *m_normalContainer; //左侧可展开窗口
|
||||
AttentionContainer *m_attentionContainer;
|
||||
HoldContainer *m_holdContainer;
|
||||
HoldContainer *m_holdContainer; //常驻窗口
|
||||
|
||||
static int TrayWidgetWidth;
|
||||
static int TrayWidgetHeight;
|
||||
|
@ -665,7 +665,12 @@ void SNITrayWidget::showHoverTips()
|
||||
if (tooltip.title.isEmpty())
|
||||
return;
|
||||
|
||||
m_tipsLabel->setText(tooltip.title);
|
||||
// 当提示信息中有换行符时,需要使用setTextList
|
||||
if (tooltip.title.contains('\n'))
|
||||
m_tipsLabel->setTextList(tooltip.title.split('\n'));
|
||||
else
|
||||
m_tipsLabel->setText(tooltip.title);
|
||||
|
||||
m_tipsLabel->setAccessibleName(itemKeyForConfig().replace("sni:",""));
|
||||
|
||||
showPopupWindow(m_tipsLabel);
|
||||
|
@ -39,6 +39,10 @@ class TipsWidget;
|
||||
//using namespace com::deepin::dde;
|
||||
using namespace org::kde;
|
||||
|
||||
/**
|
||||
* @brief The SNITrayWidget class
|
||||
* @note 系统托盘第三方程序窗口
|
||||
*/
|
||||
class SNITrayWidget : public AbstractTrayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -98,8 +98,8 @@ private:
|
||||
QTimer *m_refreshSNIItemsTimer;
|
||||
|
||||
QMap<QString, AbstractTrayWidget *> m_trayMap;
|
||||
QMap<QString, SNITrayWidget *> m_passiveSNITrayMap;
|
||||
QMap<QString, IndicatorTray*> m_indicatorMap;
|
||||
QMap<QString, SNITrayWidget *> m_passiveSNITrayMap; //这个目前好像无用了
|
||||
QMap<QString, IndicatorTray*> m_indicatorMap; //这个有键盘跟license
|
||||
|
||||
Dock::TipsWidget *m_tipsLabel;
|
||||
bool m_pluginLoaded;
|
||||
|
Loading…
x
Reference in New Issue
Block a user