diff options
-rw-r--r-- | gui/init.cpp | 1 | ||||
-rw-r--r-- | spline/spline-widget.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gui/init.cpp b/gui/init.cpp index b70f6df6..d2b0c27d 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -204,7 +204,6 @@ int otr_main(int argc, char** argv, std::function<QWidget*()> const& make_main_w QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QCoreApplication::setAttribute(Qt::AA_X11InitThreads); - QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication app(argc, argv); diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index a2f2f0f5..7c92094d 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -139,12 +139,14 @@ void spline_widget::drawBackground() const QString text = QString::number(i); + const double width = #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) - const double width = metrics.horizontalAdvance(text); + metrics.horizontalAdvance(text); #else // XXX remove after Linux upgrades -sh 20181225 - const double width = metrics.width(text); + metrics.width(text); #endif + painter.drawText(QRectF{x - width/2, pixel_bounds.height() + 10 + height, width, height}, |