mirror of
https://github.com/esphome/esphome.git
synced 2024-12-12 08:24:55 +01:00
clang-tidy fixes
This commit is contained in:
parent
62b7c05cd7
commit
e40277aa56
6 changed files with 4 additions and 17 deletions
|
@ -11,7 +11,7 @@ static const char *const TAG = "horizontalstack";
|
||||||
|
|
||||||
void HorizontalStack::dump_config(int indent_depth, int additional_level_depth) {
|
void HorizontalStack::dump_config(int indent_depth, int additional_level_depth) {
|
||||||
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sChild alignment: %s", indent_depth, "", vertical_child_align_to_string(this->child_align_));
|
ESP_LOGCONFIG(TAG, "%*sChild alignment: %s", indent_depth, "", LOG_STR_ARG(vertical_child_align_to_string(this->child_align_)));
|
||||||
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
||||||
|
|
||||||
for (LayoutItem *child : this->children_) {
|
for (LayoutItem *child : this->children_) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ static const int TEXT_ALIGN_Y_MASK =
|
||||||
|
|
||||||
void TextPanel::dump_config(int indent_depth, int additional_level_depth) {
|
void TextPanel::dump_config(int indent_depth, int additional_level_depth) {
|
||||||
std::string text = this->text_.value();
|
std::string text = this->text_.value();
|
||||||
ESP_LOGCONFIG(TAG, "%*sText Align: %s", indent_depth, "", display::text_align_to_string(this->text_align_));
|
ESP_LOGCONFIG(TAG, "%*sText Align: %s", indent_depth, "", LOG_STR_ARG(display::text_align_to_string(this->text_align_)));
|
||||||
ESP_LOGCONFIG(TAG, "%*sText: %s", indent_depth, "", text.c_str());
|
ESP_LOGCONFIG(TAG, "%*sText: %s", indent_depth, "", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,6 @@
|
||||||
#include "esphome/core/automation.h"
|
#include "esphome/core/automation.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace display {
|
|
||||||
|
|
||||||
extern const Color COLOR_ON;
|
|
||||||
extern const Color COLOR_OFF;
|
|
||||||
|
|
||||||
} // namespace display
|
|
||||||
namespace graphical_layout {
|
namespace graphical_layout {
|
||||||
|
|
||||||
/** The TextPanel is a UI item that renders a single line of text to a display */
|
/** The TextPanel is a UI item that renders a single line of text to a display */
|
||||||
|
|
|
@ -15,7 +15,7 @@ static const int TEXT_ALIGN_Y_MASK =
|
||||||
void TextRunPanel::dump_config(int indent_depth, int additional_level_depth) {
|
void TextRunPanel::dump_config(int indent_depth, int additional_level_depth) {
|
||||||
ESP_LOGCONFIG(TAG, "%*sMin Width: %i", indent_depth, "", this->min_width_);
|
ESP_LOGCONFIG(TAG, "%*sMin Width: %i", indent_depth, "", this->min_width_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sMax Width: %i", indent_depth, "", this->max_width_);
|
ESP_LOGCONFIG(TAG, "%*sMax Width: %i", indent_depth, "", this->max_width_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sText Align: %s", indent_depth, "", display::text_align_to_string(this->text_align_));
|
ESP_LOGCONFIG(TAG, "%*sText Align: %s", indent_depth, "", LOG_STR_ARG(display::text_align_to_string(this->text_align_)));
|
||||||
ESP_LOGCONFIG(TAG, "%*sText Runs: %i", indent_depth, "", this->text_runs_.size());
|
ESP_LOGCONFIG(TAG, "%*sText Runs: %i", indent_depth, "", this->text_runs_.size());
|
||||||
for (TextRun *run : this->text_runs_) {
|
for (TextRun *run : this->text_runs_) {
|
||||||
std::string text = run->text_.value();
|
std::string text = run->text_.value();
|
||||||
|
@ -70,7 +70,6 @@ CalculatedLayout TextRunPanel::determine_layout(display::Display *display, displ
|
||||||
|
|
||||||
for (TextRun *run : this->text_runs_) {
|
for (TextRun *run : this->text_runs_) {
|
||||||
int x1;
|
int x1;
|
||||||
int y1;
|
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int baseline;
|
int baseline;
|
||||||
|
|
|
@ -7,12 +7,6 @@
|
||||||
#include "esphome/core/automation.h"
|
#include "esphome/core/automation.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace display {
|
|
||||||
|
|
||||||
extern const Color COLOR_ON;
|
|
||||||
extern const Color COLOR_OFF;
|
|
||||||
|
|
||||||
} // namespace display
|
|
||||||
namespace graphical_layout {
|
namespace graphical_layout {
|
||||||
|
|
||||||
class TextRunPanel;
|
class TextRunPanel;
|
||||||
|
|
|
@ -11,7 +11,7 @@ static const char *const TAG = "verticalstack";
|
||||||
|
|
||||||
void VerticalStack::dump_config(int indent_depth, int additional_level_depth) {
|
void VerticalStack::dump_config(int indent_depth, int additional_level_depth) {
|
||||||
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sChild alignment: %s", indent_depth, "", horizontal_child_align_to_string(this->child_align_));
|
ESP_LOGCONFIG(TAG, "%*sChild alignment: %s", indent_depth, "", LOG_STR_ARG(horizontal_child_align_to_string(this->child_align_)));
|
||||||
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
||||||
|
|
||||||
for (LayoutItem *child : this->children_) {
|
for (LayoutItem *child : this->children_) {
|
||||||
|
|
Loading…
Reference in a new issue