mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-24 03:32:05 +08:00
cabana: get icon size from QStyle::PM_SmallIconSize (#27548)
old-commit-hash: b5d29b550c
This commit is contained in:
@@ -170,6 +170,8 @@ QToolButton *toolButton(const QString &icon, const QString &tooltip) {
|
||||
btn->setIcon(utils::icon(icon));
|
||||
btn->setToolTip(tooltip);
|
||||
btn->setAutoRaise(true);
|
||||
const int metric = qApp->style()->pixelMetric(QStyle::PM_SmallIconSize);
|
||||
btn->setIconSize({metric, metric});
|
||||
return btn;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user