diff --git a/esphome/components/graphical_layout/horizontal_stack.cpp b/esphome/components/graphical_layout/horizontal_stack.cpp index e17ad3173b..b8fe517327 100644 --- a/esphome/components/graphical_layout/horizontal_stack.cpp +++ b/esphome/components/graphical_layout/horizontal_stack.cpp @@ -11,7 +11,7 @@ static const char *const TAG = "horizontalstack"; 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, "%*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()); for (LayoutItem *child : this->children_) { diff --git a/esphome/components/graphical_layout/text_panel.cpp b/esphome/components/graphical_layout/text_panel.cpp index 8273a9e018..40bf535fb4 100644 --- a/esphome/components/graphical_layout/text_panel.cpp +++ b/esphome/components/graphical_layout/text_panel.cpp @@ -14,7 +14,7 @@ static const int TEXT_ALIGN_Y_MASK = void TextPanel::dump_config(int indent_depth, int additional_level_depth) { 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()); } diff --git a/esphome/components/graphical_layout/text_panel.h b/esphome/components/graphical_layout/text_panel.h index b72712cce5..2198a746e0 100644 --- a/esphome/components/graphical_layout/text_panel.h +++ b/esphome/components/graphical_layout/text_panel.h @@ -7,12 +7,6 @@ #include "esphome/core/automation.h" namespace esphome { -namespace display { - -extern const Color COLOR_ON; -extern const Color COLOR_OFF; - -} // namespace display namespace graphical_layout { /** The TextPanel is a UI item that renders a single line of text to a display */ diff --git a/esphome/components/graphical_layout/text_run_panel.cpp b/esphome/components/graphical_layout/text_run_panel.cpp index 55d0713e15..e4a1021819 100644 --- a/esphome/components/graphical_layout/text_run_panel.cpp +++ b/esphome/components/graphical_layout/text_run_panel.cpp @@ -15,7 +15,7 @@ static const int TEXT_ALIGN_Y_MASK = 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, "%*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()); for (TextRun *run : this->text_runs_) { std::string text = run->text_.value(); @@ -70,7 +70,6 @@ CalculatedLayout TextRunPanel::determine_layout(display::Display *display, displ for (TextRun *run : this->text_runs_) { int x1; - int y1; int width; int height; int baseline; diff --git a/esphome/components/graphical_layout/text_run_panel.h b/esphome/components/graphical_layout/text_run_panel.h index 4a86ed4e1d..3fc1e9c790 100644 --- a/esphome/components/graphical_layout/text_run_panel.h +++ b/esphome/components/graphical_layout/text_run_panel.h @@ -7,12 +7,6 @@ #include "esphome/core/automation.h" namespace esphome { -namespace display { - -extern const Color COLOR_ON; -extern const Color COLOR_OFF; - -} // namespace display namespace graphical_layout { class TextRunPanel; diff --git a/esphome/components/graphical_layout/vertical_stack.cpp b/esphome/components/graphical_layout/vertical_stack.cpp index 9c020db176..dc363a77fb 100644 --- a/esphome/components/graphical_layout/vertical_stack.cpp +++ b/esphome/components/graphical_layout/vertical_stack.cpp @@ -11,7 +11,7 @@ static const char *const TAG = "verticalstack"; 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, "%*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()); for (LayoutItem *child : this->children_) {