mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 修复切换藏语,任务栏中tooltip的应用名称显示异常,藏语头部被截断
tooltip的应用名称显示绘制时,字体所占像素调整为字体实际使用rect高度的一半减一最为合适,否则碰到藏文这种特殊字体会导致显示不全 Log: 修复切换藏语,任务栏中tooltip的应用名称显示异常,藏语头部被截断 Bug: https://pms.uniontech.com/zentao/bug-view-76847.html Change-Id: Ia999ef70acb93bdf9b6d7039c9facac5b21e9250
This commit is contained in:
parent
923f3da995
commit
deeb523fea
@ -61,6 +61,10 @@ void TipsWidget::paintEvent(QPaintEvent *event)
|
||||
int fontHeight = fontMetrics().height();
|
||||
option.setAlignment(Qt::AlignCenter);
|
||||
|
||||
QFont textFont;
|
||||
textFont.setPixelSize(rect().height() / 2 - 1);
|
||||
painter.setFont(textFont);
|
||||
|
||||
switch (m_type) {
|
||||
case SingleLine: {
|
||||
painter.drawText(rect(), m_text, option);
|
||||
|
Loading…
x
Reference in New Issue
Block a user