From 8d4a3842eec7682aa7bf8de7979b2ea099a8f1d9 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Fri, 12 Dec 2014 20:44:14 +0100 Subject: Prevent the tank bar from overlaping the temperature graph. Signed-off-by: Joakim Bygdell Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 197056183..1a9d5ccf7 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -359,7 +359,7 @@ void ProfileWidget2::setupItemSizes() // Temperature axis config itemPos.temperature.pos.on.setX(3); - itemPos.temperature.pos.on.setY(50); + itemPos.temperature.pos.on.setY(60); itemPos.temperatureAll.pos.on.setY(51); itemPos.temperature.pos.off.setX(-10); itemPos.temperature.pos.off.setY(40); @@ -656,7 +656,11 @@ void ProfileWidget2::settingsChanged() } } else { profileYAxis->animateChangeLine(itemPos.depth.expanded); - temperatureAxis->setPos(itemPos.temperature.pos.on); + if (prefs.tankbar) { + temperatureAxis->setPos(itemPos.temperatureAll.pos.on); + } else { + temperatureAxis->setPos(itemPos.temperature.pos.on); + } temperatureAxis->animateChangeLine(itemPos.temperature.expanded); cylinderPressureAxis->animateChangeLine(itemPos.cylinder.expanded); } @@ -928,7 +932,11 @@ void ProfileWidget2::setProfileState() } } else { profileYAxis->animateChangeLine(itemPos.depth.expanded); - temperatureAxis->setPos(itemPos.temperature.pos.on); + if (prefs.tankbar) { + temperatureAxis->setPos(itemPos.temperatureAll.pos.on); + } else { + temperatureAxis->setPos(itemPos.temperature.pos.on); + } temperatureAxis->animateChangeLine(itemPos.temperature.expanded); cylinderPressureAxis->animateChangeLine(itemPos.cylinder.expanded); } -- cgit v1.2.3-70-g09d2