From eef94ed986fe6e2cf8ac85be114c69de65079a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 1 May 2020 16:35:24 +0200 Subject: Move the "in"/"out" label inside the powermap view. But now when dragging a ball there. It cannot be selected anymore, because it doesn't get focused by the mouse. --- plugingui/powerwidget.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc index 3c2ad93..2843d85 100644 --- a/plugingui/powerwidget.cc +++ b/plugingui/powerwidget.cc @@ -43,7 +43,7 @@ PowerWidget::PowerWidget(GUI::Widget* parent, , canvas(this, settings, settings_notifier) , settings(settings) { - canvas.move(27, 7); + canvas.move(7, 7); CONNECT(&shelf_checkbox, stateChangedNotifier, this, &PowerWidget::chk_shelf); @@ -55,9 +55,11 @@ PowerWidget::PowerWidget(GUI::Widget* parent, input_label.setText("in"); input_label.resize(20, 16); input_label.setAlignment(GUI::TextAlignment::center); + input_label.setColour(GUI::Colour(1.0f, 1.0f, 1.0f, 0.2f)); output_label.setText("out"); output_label.resize(20, 16); output_label.setAlignment(GUI::TextAlignment::left); + output_label.setColour(GUI::Colour(1.0f, 1.0f, 1.0f, 0.2f)); CONNECT(&settings_notifier, powermap_shelf, &shelf_checkbox, &GUI::CheckBox::setChecked); @@ -72,7 +74,7 @@ void PowerWidget::repaintEvent(GUI::RepaintEvent *repaintEvent) { GUI::Painter p(*this); box.setSize(width() - 59 - 64, height()); - p.drawImage(20, 0, box); + p.drawImage(0, 0, box); } void PowerWidget::resize(std::size_t width, std::size_t height) @@ -87,8 +89,8 @@ void PowerWidget::resize(std::size_t width, std::size_t height) shelf_label.move(width - 59 + 5 - 32 , 0); shelf_checkbox.move(width - 59 + 5 - 32, 16); - input_label.move(20+(width-64-59)/2, height-2); - output_label.move(0, height/2); + input_label.move((width-64-59)/2, height-30); + output_label.move(20, height/2); } PowerWidget::Canvas::Canvas(GUI::Widget* parent, -- cgit v1.2.3