Test, clang-format, and ci-custom fixes

This commit is contained in:
Michael Davidson 2023-12-30 11:07:47 +11:00
parent 38ac72c912
commit 5f47c6e255
No known key found for this signature in database
GPG key ID: B8D1A99712B8B0EB
2 changed files with 7 additions and 6 deletions

View file

@ -41,7 +41,7 @@ display::Rect TextRunPanel::measure_item_internal(display::Display *display) {
void TextRunPanel::render_internal(display::Display *display, display::Rect bounds) {
CalculatedLayout layout = this->determine_layout(display, bounds, true);
for (const auto& calculated : layout.runs) {
for (const auto &calculated : layout.runs) {
if (calculated->run->background_color_ != display::COLOR_OFF) {
display->filled_rectangle(calculated->bounds.x, calculated->bounds.y, calculated->bounds.w, calculated->bounds.h,
calculated->run->background_color_);
@ -52,7 +52,7 @@ void TextRunPanel::render_internal(display::Display *display, display::Rect boun
if (this->debug_outline_runs_) {
ESP_LOGD(TAG, "Outlining character runs");
for (const auto& calculated : layout.runs) {
for (const auto &calculated : layout.runs) {
display->rectangle(calculated->bounds.x, calculated->bounds.y, calculated->bounds.w, calculated->bounds.h);
}
}
@ -185,7 +185,7 @@ void TextRunPanel::apply_alignment_to_layout(CalculatedLayout *calculated_layout
std::vector<std::shared_ptr<CalculatedTextRun>> line_runs;
// Get all the runs for the current line
for (const auto& run : calculated_layout->runs) {
for (const auto &run : calculated_layout->runs) {
if (run->line_number_ == i) {
line_runs.push_back(run);
}
@ -224,7 +224,7 @@ void TextRunPanel::apply_alignment_to_layout(CalculatedLayout *calculated_layout
}
int max_line_y_adjustment = 0;
for (const auto& run : line_runs) {
for (const auto &run : line_runs) {
ESP_LOGVV(TAG, "Adjusting '%s' from (%i, %i) to (%i, %i)", run->text_.c_str(), run->bounds.x, run->bounds.y,
run->bounds.x + x_adjustment, run->bounds.y + y_adjustment);
run->bounds.x += x_adjustment;

View file

@ -4351,7 +4351,8 @@ graphical_layout:
lambda: |-
it.filled_circle(25, 25, 10);
- type: text_run_panel
texT_align: BASELINE_CENTER
text_align: BASELINE_CENTER
max_width: 100
runs:
- font: roboto
text: Hello
@ -4361,4 +4362,4 @@ graphical_layout:
foreground_color: layout_white
- font: roboto
text: !lambda |-
return "Dynamic text";
return "Dynamic text";