mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 解决任务栏应用tips弹窗边距异常问题
根据设计师要求将控件左右间距修改为10 Log: 任务栏应用tips弹窗左右间距修改为10 Bug: https://pms.uniontech.com/zentao/bug-view-61164.html Change-Id: I6353058b02c9e98cdf9f2a597713008a3aadb4f1
This commit is contained in:
parent
b6503312cc
commit
02a1129b0b
@ -21,7 +21,7 @@ void TipsWidget::setText(const QString &text)
|
|||||||
// 同时去掉两边的空白信息,例如qBittorrent的提示
|
// 同时去掉两边的空白信息,例如qBittorrent的提示
|
||||||
m_text = document.toPlainText().simplified();
|
m_text = document.toPlainText().simplified();
|
||||||
|
|
||||||
setFixedSize(fontMetrics().width(m_text) + 6, fontMetrics().height());
|
setFixedSize(fontMetrics().width(m_text) + 20, fontMetrics().height());
|
||||||
|
|
||||||
update();
|
update();
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ void TipsWidget::setTextList(const QStringList &textList)
|
|||||||
int k = fontMetrics().height() * m_textList.size();
|
int k = fontMetrics().height() * m_textList.size();
|
||||||
setFixedHeight(k);
|
setFixedHeight(k);
|
||||||
for (QString text : m_textList) {
|
for (QString text : m_textList) {
|
||||||
int fontLength = fontMetrics().width(text) + 6;
|
int fontLength = fontMetrics().width(text) + 20;
|
||||||
maxLength = maxLength > fontLength ? maxLength : fontLength;
|
maxLength = maxLength > fontLength ? maxLength : fontLength;
|
||||||
}
|
}
|
||||||
m_width = maxLength;
|
m_width = maxLength;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user