diff --git a/esphome/components/graphical_layout/fixed_dimension_panel.cpp b/esphome/components/graphical_layout/fixed_dimension_panel.cpp index ef564d2790..6f37d0c18a 100644 --- a/esphome/components/graphical_layout/fixed_dimension_panel.cpp +++ b/esphome/components/graphical_layout/fixed_dimension_panel.cpp @@ -12,14 +12,14 @@ static const char *const TAG = "fixeddimensionpanel"; void FixedDimensionPanel::dump_config(int indent_depth, int additional_level_depth) { this->dump_config_base_properties(TAG, indent_depth); if (this->width_.value() < 0) { - ESP_LOGCONFIG(TAG, "%*sWidth: UNSET (Will use %s's width)", indent_depth, "", + ESP_LOGCONFIG(TAG, "%*sWidth: UNSET (Will use %s's width)", indent_depth, "", this->unset_width_uses_display_width_ ? "DISPLAY" : "CHILD"); } else { ESP_LOGCONFIG(TAG, "%*sWidth: %i", indent_depth, "", this->width_.value()); } if (this->height_.value() < 0) { - ESP_LOGCONFIG(TAG, "%*sHeight: UNSET (Will use %s's height)", indent_depth, "", + ESP_LOGCONFIG(TAG, "%*sHeight: UNSET (Will use %s's height)", indent_depth, "", this->unset_height_uses_display_height_ ? "DISPLAY" : "CHILD"); } else { ESP_LOGCONFIG(TAG, "%*sHeight: %i", indent_depth, "", this->height_.value()); diff --git a/esphome/components/graphical_layout/fixed_dimension_panel.h b/esphome/components/graphical_layout/fixed_dimension_panel.h index e7221a58be..ed69e8e2b1 100644 --- a/esphome/components/graphical_layout/fixed_dimension_panel.h +++ b/esphome/components/graphical_layout/fixed_dimension_panel.h @@ -19,12 +19,8 @@ class FixedDimensionPanel : public LayoutItem { template void set_width(V width) { this->width_ = width; }; template void set_height(V height) { this->height_ = height; } - void set_unset_width_uses_display_width(bool use_display) { - this->unset_width_uses_display_width_ = use_display; - } - void set_unset_height_uses_display_height(bool use_display) { - this->unset_height_uses_display_height_ = use_display; - } + void set_unset_width_uses_display_width(bool use_display) { this->unset_width_uses_display_width_ = use_display; } + void set_unset_height_uses_display_height(bool use_display) { this->unset_height_uses_display_height_ = use_display; } protected: LayoutItem *child_{nullptr}; diff --git a/esphome/components/graphical_layout/layout_item.h b/esphome/components/graphical_layout/layout_item.h index 9274ba0b84..daec813682 100644 --- a/esphome/components/graphical_layout/layout_item.h +++ b/esphome/components/graphical_layout/layout_item.h @@ -1,9 +1,9 @@ #pragma once #include "esphome/core/color.h" -#include "esphome/core/log.h" namespace esphome { +struct LogString; namespace display { class Display; class Rect; @@ -85,7 +85,7 @@ class LayoutItem { virtual void dump_config(int indent_depth, int additional_level_depth) = 0; /** Dumps the base properties of the LayoutItem. Should be called by implementors dump_config() - * + * * param[in] tag: Tag to pass to ESP_LOGCONFIG * param[in] indent_depth: Depth to indent the config */ @@ -105,7 +105,7 @@ class LayoutItem { int margin_{0}; int padding_{0}; int border_{0}; - Color border_color_{Color(0, 0, 0, 0)}; + Color border_color_{Color::BLACK}; }; const LogString *horizontal_child_align_to_string(HorizontalChildAlign align);