Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.0
-
None
Description
When mac application has style "Fusion" and font-size 13pt, toolbar buttons(at least) a little bit smaller than they are supposed to be, and button text is cut.
Minimal reproducible example:
#include <QApplication> #include <QMainWindow> #include <QStyleFactory> #include <QToolBar> int main(int argc, char *argv[]) { QApplication a(argc, argv); QApplication::setStyle(QStyleFactory::create("Fusion")); a.setStyleSheet("* {font-size:13pt}"); QMainWindow w; QToolBar *toolbar = w.addToolBar("toolbar"); toolbar->addAction("Hello, Cruel World!"); w.show(); return a.exec(); }
The bug appears only on macOS, only with style "Fusion" and only with font-size 13pt. I attached several screenshots:
fail_fusion_13.png - the bug. Style "Fusion", font-size 13pt
ok_default_13.png - expected behavior. Default style, font-size 13pt
ok_fusion_14.png - expected behavior. Style "Fusion", font-size 14pt
My system:
$ uname -a
Darwin MacBook-Pro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
Maybe there is a workaround for this? Apart of setting different font size or style, of course.