From ff57b3c8cb3be9463d9ce296c3c31b4df1556e9f Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 25 May 2016 11:32:06 -0700 Subject: [PATCH] Add Color-only constructor to ui::Rectangle widget. --- firmware/common/ui_widget.cpp | 7 +++++++ firmware/common/ui_widget.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/firmware/common/ui_widget.cpp b/firmware/common/ui_widget.cpp index abc040c3..31a71d51 100644 --- a/firmware/common/ui_widget.cpp +++ b/firmware/common/ui_widget.cpp @@ -256,6 +256,13 @@ std::string View::title() const { /* Rectangle *************************************************************/ +Rectangle::Rectangle( + Color c +) : Widget { }, + color { c } +{ +} + Rectangle::Rectangle( Rect parent_rect, Color c diff --git a/firmware/common/ui_widget.hpp b/firmware/common/ui_widget.hpp index eb45de44..2c427249 100644 --- a/firmware/common/ui_widget.hpp +++ b/firmware/common/ui_widget.hpp @@ -168,6 +168,7 @@ protected: class Rectangle : public Widget { public: + Rectangle(Color c); Rectangle(Rect parent_rect, Color c); void paint(Painter& painter) override;