From 16cce5abd09e5439e845cdfa82ad98bd37d1bc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 19 Jan 2016 09:04:54 +0100 Subject: [PATCH] Code cleanup --- src/track.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/track.cpp b/src/track.cpp index 7d9f8753..fb7f3fae 100644 --- a/src/track.cpp +++ b/src/track.cpp @@ -9,11 +9,11 @@ #include "ll.h" #include "track.h" -#include - -#define MARGIN 10.0 -#define TRACK_WIDTH 3 +#define MARGIN 10.0 +#define TRACK_WIDTH 3 +#define SCALE_OFFSET_X 7 +#define SCALE_OFFSET_Y 15 Track::Track(QWidget *parent) : QGraphicsView(parent) @@ -391,7 +391,8 @@ void Track::resizeEvent(QResizeEvent *e) void Track::paintEvent(QPaintEvent *e) { - QPointF scenePos = mapToScene(rect().bottomLeft() + QPoint(10, -15)); + QPointF scenePos = mapToScene(rect().bottomLeft() + QPoint(SCALE_OFFSET_X, + -SCALE_OFFSET_Y)); _mapScale->setPos(scenePos); QGraphicsView::paintEvent(e);