mirror of
https://github.com/esphome/esphome.git
synced 2024-12-12 08:24:55 +01:00
ci-custom and clang-format fixes
This commit is contained in:
parent
cbd4515900
commit
9e7ccebaa1
3 changed files with 7 additions and 11 deletions
|
@ -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());
|
||||
|
|
|
@ -19,12 +19,8 @@ class FixedDimensionPanel : public LayoutItem {
|
|||
template<typename V> void set_width(V width) { this->width_ = width; };
|
||||
template<typename V> 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};
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue