mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 12:06:26 +01:00
... more clang fixes
This commit is contained in:
parent
fc6aa95ac4
commit
a61343e8ec
@ -10,8 +10,8 @@ class Point {
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
|
||||
Point() : x(VALUE_NO_SET), y(VALUE_NO_SET) {};
|
||||
inline Point(int16_t x, int16_t y) ALWAYS_INLINE : x(x), y(y) {};
|
||||
Point() : x(VALUE_NO_SET), y(VALUE_NO_SET){};
|
||||
inline Point(int16_t x, int16_t y) ALWAYS_INLINE : x(x), y(y){};
|
||||
};
|
||||
|
||||
} // namespace display
|
||||
|
@ -6,16 +6,15 @@ namespace esphome {
|
||||
namespace display {
|
||||
class Display;
|
||||
class Rect;
|
||||
}
|
||||
} // namespace display
|
||||
|
||||
namespace graphical_layout {
|
||||
|
||||
/** The ContainerLayoutItem can be used to derive from when a layout item has children.
|
||||
* It does not define what or how child items get used just that they exist for the item
|
||||
*/
|
||||
*/
|
||||
class ContainerLayoutItem : public LayoutItem {
|
||||
public:
|
||||
|
||||
/** Adds an item to this container */
|
||||
void add_item(LayoutItem *child) { this->children_.push_back(child); }
|
||||
|
||||
@ -23,5 +22,5 @@ class ContainerLayoutItem : public LayoutItem {
|
||||
std::vector<LayoutItem *> children_;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace graphical_layout
|
||||
} // namespace esphome
|
||||
|
@ -8,8 +8,7 @@ namespace graphical_layout {
|
||||
|
||||
static const char *const TAG = "rootlayoutcomponent";
|
||||
|
||||
void RootLayoutComponent::setup() {
|
||||
}
|
||||
void RootLayoutComponent::setup() {}
|
||||
|
||||
void RootLayoutComponent::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "Graphical Layout");
|
||||
|
@ -16,7 +16,7 @@ namespace graphical_layout {
|
||||
|
||||
/** Component used for rendering the layout*/
|
||||
class RootLayoutComponent : public Component {
|
||||
public:
|
||||
public:
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
|
||||
@ -30,7 +30,7 @@ public:
|
||||
|
||||
void set_layout_root(LayoutItem *layout) { this->layout_root_ = layout; };
|
||||
|
||||
protected:
|
||||
protected:
|
||||
LayoutItem *layout_root_{nullptr};
|
||||
};
|
||||
|
||||
|
@ -4,14 +4,13 @@ namespace esphome {
|
||||
namespace display {
|
||||
class Display;
|
||||
class Rect;
|
||||
}
|
||||
} // namespace display
|
||||
|
||||
namespace graphical_layout {
|
||||
|
||||
/** LayoutItem is the base from which all items derive from*/
|
||||
class LayoutItem {
|
||||
public:
|
||||
|
||||
/** Measures the item as it would be drawn on the display and returns the bounds for it
|
||||
*
|
||||
* param[in] display: Display that will be used for rendering. May be used to help with calculations
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "esphome/components/graphical_layout/graphical_layout.h"
|
||||
#include "esphome/components/font/font.h"
|
||||
|
||||
|
||||
namespace esphome {
|
||||
namespace graphical_layout {
|
||||
|
||||
@ -23,7 +22,6 @@ class TextPanel : public LayoutItem {
|
||||
void set_foreground_color(Color foreground_color) { this->foreground_color_ = foreground_color; };
|
||||
void set_background_color(Color background_color) { this->background_color_ = background_color; };
|
||||
|
||||
|
||||
protected:
|
||||
int item_padding_{0};
|
||||
std::string text_{};
|
||||
|
Loading…
Reference in New Issue
Block a user