diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-25 14:57:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-25 14:57:23 +0100 |
commit | 7509b983edb4b95b38089a89305e1d1e988da09b (patch) | |
tree | 89776defc39205bd722f8eac792fdaefebfc247f | |
parent | 4e62e90beec75f069c5802910111cbf3462e9bd8 (diff) |
fix build...
-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}, |