diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-01 19:01:25 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-01 19:01:25 +0200 |
commit | 1f41de14a04240dfd993b030306ac251d962a843 (patch) | |
tree | 08d5ef8b74793909a15cb8f3c0b7732819a41f8a /plugingui/slider.cc | |
parent | 4739f0bed6e6332fcf2c6ed2b04c4ae161c41060 (diff) |
Fix a lot of style issues in the code for the new GUI.
Diffstat (limited to 'plugingui/slider.cc')
-rw-r--r-- | plugingui/slider.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/plugingui/slider.cc b/plugingui/slider.cc index c657eb1..16808bb 100644 --- a/plugingui/slider.cc +++ b/plugingui/slider.cc @@ -31,10 +31,10 @@ #include <hugin.hpp> #include <stdio.h> -namespace GUI { +namespace GUI +{ -Slider::Slider(Widget *parent) - : Widget(parent) +Slider::Slider(Widget* parent) : Widget(parent) { state = State::up; @@ -72,21 +72,21 @@ void Slider::repaintEvent(RepaintEvent* repaintEvent) p.setColour(Colour(0.5, alpha)); } - p.drawFilledRectangle(0,0,width(),height()); + p.drawFilledRectangle(0, 0, width(), height()); - //p.setColour(Colour(0.1, alpha)); - //p.drawRectangle(0,0,width()-1,height() - 1); + // p.setColour(Colour(0.1, alpha)); + // p.drawRectangle(0,0,width()-1,height() - 1); p.setColour(Colour(1, 0, 0, alpha)); p.drawLine(xpos, 0, xpos, height() - 1); - //p.setColour(Colour(0.8, alpha)); - //switch(state) { - //case State::up: + // p.setColour(Colour(0.8, alpha)); + // switch(state) { + // case State::up: // p.drawLine(0, 0, 0, height() - 1); // p.drawLine(0, 0, width() - 1, 0); // break; - //case State::down: + // case State::down: // p.drawLine(width() - 1, 0, width() - 1, height() - 1); // p.drawLine(width() - 1, height() - 1, 0, height() - 1); // break; @@ -94,7 +94,8 @@ void Slider::repaintEvent(RepaintEvent* repaintEvent) p.setColour(Colour(0.3, alpha)); - if (height() > 0 && width() > 0) { + if(height() > 0 && width() > 0) + { p.drawPoint(0, height() - 1); p.drawPoint(width() - 1, 0); } |