diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2014-12-12 20:44:14 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-12 11:55:23 -0800 |
commit | 8d4a3842eec7682aa7bf8de7979b2ea099a8f1d9 (patch) | |
tree | 7385aab6b6bd63e1f812366c5a3fb489d99d559b /qt-ui | |
parent | f559f6c8705e563a3a91140a4c308f93b6843f77 (diff) | |
download | subsurface-8d4a3842eec7682aa7bf8de7979b2ea099a8f1d9.tar.gz |
Prevent the tank bar from overlaping the temperature graph.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
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); } |