Smaller zoom slider on macOS

Fix for #12189.
This commit is contained in:
Daniel Ramoeller 2021-03-08 20:43:03 +01:00 committed by Juergen Spitzmueller
parent 6273c1f66d
commit 3c43a01ba2

View File

@ -630,6 +630,8 @@ GuiView::GuiView(int id)
QFontMetrics const fm(statusBar()->fontMetrics());
zoom_slider_ = new QSlider(Qt::Horizontal, statusBar());
// Small size slider for macOS to prevent the status bar from enlarging
zoom_slider_->setAttribute(Qt::WA_MacSmallSize);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
zoom_slider_->setFixedWidth(fm.horizontalAdvance('x') * 15);
#else