From 5b6f4685475be7f7b68375fcab465c1626950296 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 6 Feb 2021 12:26:54 +0100 Subject: statistics: don't place labels at half-integer values Placing labels at half-integer values gives horrible rendering artifacts. Therefore, always round to integer values. The easiest way to do this is right before setting the position. Introduce a helper function to round QPointF in such scenarios. Signed-off-by: Berthold Stoeger --- Subsurface-mobile.pro | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Subsurface-mobile.pro') diff --git a/Subsurface-mobile.pro b/Subsurface-mobile.pro index 8e35c835d..a67ab8e72 100644 --- a/Subsurface-mobile.pro +++ b/Subsurface-mobile.pro @@ -143,6 +143,7 @@ SOURCES += subsurface-mobile-main.cpp \ stats/statsaxis.cpp \ stats/statscolors.cpp \ stats/statsgrid.cpp \ + stats/statshelper.cpp \ stats/statsseries.cpp \ stats/statsstate.cpp \ mobile-widgets/qmlinterface.cpp \ @@ -295,6 +296,7 @@ HEADERS += \ stats/statsaxis.h \ stats/statscolors.h \ stats/statsgrid.h \ + stats/statshelper.h \ stats/statsseries.h \ stats/statsstate.h \ stats/statstranslations.h \ -- cgit v1.2.3-70-g09d2