refine navigation mode

This commit is contained in:
Le Tan 2023-04-13 22:01:28 +08:00
parent c255cd54ed
commit c7f471cb8f

View File

@ -74,7 +74,7 @@ static QString generateNavigationLabelStyle(const QString &p_str, bool p_tiny)
QFont font(fontFamily, fontPt); QFont font(fontFamily, fontPt);
font.setBold(true); font.setBold(true);
QFontMetrics fm(font); QFontMetrics fm(font);
pxWidth = fm.width(p_str); pxWidth = fm.width(p_str) + 5;
pxHeight = fm.capHeight() + 5; pxHeight = fm.capHeight() + 5;
lastLen = p_str.size(); lastLen = p_str.size();
} }