From 5d4c9b511e3feef507549384816a45a962fc9df4 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 1 May 2020 18:50:27 +0200 Subject: Rotate y-axis label. --- plugingui/powerwidget.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugingui/powerwidget.cc') diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc index 3ea787c..3cb289a 100644 --- a/plugingui/powerwidget.cc +++ b/plugingui/powerwidget.cc @@ -205,8 +205,8 @@ void PowerWidget::Canvas::repaintEvent(GUI::RepaintEvent *repaintEvent) y0 + height0 - std::round(power_map.getFixed2().out * height0), rad + 1); p.setColour(GUI::Colour(1.0f, 1.0f, 1.0f, 0.2f)); - p.drawText(width() / 2, height() - 8, font, "in"); - p.drawText(16, height() / 2 + 8, font, "out"); + p.drawText(width() / 2 - (font.textWidth("in") / 2), height() - 8, font, "in"); + p.drawText(8, height() / 2 - (font.textWidth("out") / 2), font, "out", false, true); } void PowerWidget::Canvas::buttonEvent(GUI::ButtonEvent* buttonEvent) -- cgit v1.2.3