Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -24,38 +24,36 @@
namespace ui {
RecentEntriesColumns::RecentEntriesColumns(
const std::initializer_list<RecentEntriesColumn> columns
) : _columns { columns }
{
const std::initializer_list<RecentEntriesColumn> columns)
: _columns{columns} {
}
RecentEntriesHeader::RecentEntriesHeader(
const RecentEntriesColumns& columns
) : _columns { columns }
{
const RecentEntriesColumns& columns)
: _columns{columns} {
}
void RecentEntriesHeader::paint(Painter& painter) {
const auto r = screen_rect();
const auto& parent_style = style();
const auto r = screen_rect();
const auto& parent_style = style();
const Style style {
.font = parent_style.font,
.background = Color::blue(),
.foreground = parent_style.foreground,
};
const Style style{
.font = parent_style.font,
.background = Color::blue(),
.foreground = parent_style.foreground,
};
auto p = r.location();
for(const auto& column : _columns) {
const auto width = column.second;
auto text = column.first;
if( width > text.length() ) {
text.append(width - text.length(), ' ');
}
auto p = r.location();
for (const auto& column : _columns) {
const auto width = column.second;
auto text = column.first;
if (width > text.length()) {
text.append(width - text.length(), ' ');
}
painter.draw_string(p, style, text);
p += { static_cast<Coord>((width * 8) + 8), 0 };
}
painter.draw_string(p, style, text);
p += {static_cast<Coord>((width * 8) + 8), 0};
}
}
} /* namespace ui */