diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-16 17:34:30 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-16 17:34:30 +0200 |
commit | b4ad2a3b4eb808081fccef26482508db552a914e (patch) | |
tree | 3742e34b832cd5c8062a1cce5d80cf13472ae8f1 /plugingui/slider.h | |
parent | 730597ff95d5dcfa924bc0bb951c02873ccffa8c (diff) |
Style fixes in slider.h/slider.cc
Diffstat (limited to 'plugingui/slider.h')
-rw-r--r-- | plugingui/slider.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/plugingui/slider.h b/plugingui/slider.h index 22d162d..26e82ba 100644 --- a/plugingui/slider.h +++ b/plugingui/slider.h @@ -26,22 +26,29 @@ */ #pragma once -#include "widget.h" #include "texture.h" #include "texturedbox.h" +#include "widget.h" namespace GUI { -class Slider : public Widget +class Slider + : public Widget { public: Slider(Widget* parent); virtual ~Slider() = default; // From Widget: - bool catchMouse() override { return true; } - bool isFocusable() override { return true; } + bool catchMouse() override + { + return true; + } + bool isFocusable() override + { + return true; + } void setValue(float new_value); float value() const; @@ -66,15 +73,15 @@ private: State state; - TexturedBox bar{getImageCache(), ":slider.png", - 0, 0, // atlas offset (x, y) - 7, 1, 7, // dx1, dx2, dx3 - 7, 1, 7 // dy1, dy2, dy3 + TexturedBox bar{ + getImageCache(), ":slider.png", 0, 0, // atlas offset (x, y) + 7, 1, 7, // dx1, dx2, dx3 + 7, 1, 7 // dy1, dy2, dy3 }; - TexturedBox inner_bar_green{getImageCache(), ":slider.png", - 30, 0, // atlas offset (x, y) - 2, 1, 2, // dx1, dx2, dx3 - 2, 1, 2 // dy1, dy2, dy3 + TexturedBox inner_bar_green{ + getImageCache(), ":slider.png", 30, 0, // atlas offset (x, y) + 2, 1, 2, // dx1, dx2, dx3 + 2, 1, 2 // dy1, dy2, dy3 }; // TexturedBox inner_bar_red{getImageCache(), ":slider.png", // 30, 5, // atlas offset (x, y) @@ -86,9 +93,9 @@ private: // 2, 1, 2, // dx1, dx2, dx3 // 2, 1, 2 // dy1, dy2, dy3 // }; - Texture button{getImageCache(), ":slider.png", - 15, 0, // atlas offset (x, y) - 15, 15 // width, height + Texture button{ + getImageCache(), ":slider.png", 15, 0, // atlas offset (x, y) + 15, 15 // width, height }; std::size_t bar_boundary{5}; |