Open paulmcauley opened 3 years ago
Was planning to refactor the TextButton::horzPadding
from a hardcoded 4px
anyways, so I just made it use smallSpacing
.
As for why the QMenu
doesn't scale, I'm not sure.
Here's what 200% scaling looks like for me to confirm the bug.
Hmm, if I uncomment the code to display the normal "Application Menu" icon button that tells KWin to display the menu, it draws the entire menu at 100%. Even the text is at 100% scaling.
Even breeze seems to have this bug. Can you confirm this @paulmcauley?
No, I don't have the problem with a normal application menu in Breeze (Plasma 5.21.2). Here is what 250% with a normal application menu looks like for me:
It is possible to fix the small icon with QProxyStyle.
int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const override {
qCDebug(category) << metric;
if (metric == QStyle::PM_ButtonIconSize) {
return QProxyStyle::pixelMetric(metric, option, widget) * pixelRatio;
}
return QProxyStyle::pixelMetric(metric, option, widget);
}
Then appMenu->setStyle(xxx)
should works.
But I don't know how to get the pixelRatio in a decoration.
I have a HiDPI display at 250% scaling.
Here is a screenshot of how the Material menu looks:
Here is a screenshot of how a normal menu looks:
As you can see, the menu's icon size and padding are too small when scaling is used.