summaryrefslogtreecommitdiff
path: root/plugingui/powerwidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/powerwidget.cc')
-rw-r--r--plugingui/powerwidget.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc
index 7e8a904..3f169d6 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(7, 7);
+ canvas.move(27, 7);
CONNECT(&shelf_checkbox, stateChangedNotifier, this, &PowerWidget::chk_shelf);
@@ -52,6 +52,13 @@ PowerWidget::PowerWidget(GUI::Widget* parent,
shelf_label.resize(59, 16);
shelf_checkbox.resize(59, 40);
+ input_label.setText("in");
+ input_label.resize(20, 16);
+ input_label.setAlignment(GUI::TextAlignment::center);
+ output_label.setText("out");
+ output_label.resize(20, 16);
+ output_label.setAlignment(GUI::TextAlignment::left);
+
CONNECT(&settings_notifier, powermap_shelf, &shelf_checkbox,
&GUI::CheckBox::setChecked);
}
@@ -65,7 +72,7 @@ void PowerWidget::repaintEvent(GUI::RepaintEvent *repaintEvent)
{
GUI::Painter p(*this);
box.setSize(width() - 59 - 64, height());
- p.drawImage(0, 0, box);
+ p.drawImage(20, 0, box);
}
void PowerWidget::resize(std::size_t width, std::size_t height)
@@ -80,6 +87,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);
}
PowerWidget::Canvas::Canvas(GUI::Widget* parent,