mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Execute clang tidy and IWYU (#528)
This commit is contained in:

committed by
ArthurSonzogni

parent
4dc1a9fff9
commit
0542227ba7
@@ -39,11 +39,11 @@ Element vscroll_indicator(Element child) {
|
||||
|
||||
const Box& stencil = screen.stencil;
|
||||
|
||||
int size_inner = box_.y_max - box_.y_min;
|
||||
const int size_inner = box_.y_max - box_.y_min;
|
||||
if (size_inner <= 0) {
|
||||
return;
|
||||
}
|
||||
int size_outter = stencil.y_max - stencil.y_min + 1;
|
||||
const int size_outter = stencil.y_max - stencil.y_min + 1;
|
||||
if (size_outter >= size_inner) {
|
||||
return;
|
||||
}
|
||||
@@ -51,15 +51,16 @@ Element vscroll_indicator(Element child) {
|
||||
int size = 2 * size_outter * size_outter / size_inner;
|
||||
size = std::max(size, 1);
|
||||
|
||||
int start_y = 2 * stencil.y_min + //
|
||||
2 * (stencil.y_min - box_.y_min) * size_outter / size_inner;
|
||||
const int start_y =
|
||||
2 * stencil.y_min + //
|
||||
2 * (stencil.y_min - box_.y_min) * size_outter / size_inner;
|
||||
|
||||
const int x = stencil.x_max;
|
||||
for (int y = stencil.y_min; y <= stencil.y_max; ++y) {
|
||||
int y_up = 2 * y + 0;
|
||||
int y_down = 2 * y + 1;
|
||||
bool up = (start_y <= y_up) && (y_up <= start_y + size);
|
||||
bool down = (start_y <= y_down) && (y_down <= start_y + size);
|
||||
const int y_up = 2 * y + 0;
|
||||
const int y_down = 2 * y + 1;
|
||||
const bool up = (start_y <= y_up) && (y_up <= start_y + size);
|
||||
const bool down = (start_y <= y_down) && (y_down <= start_y + size);
|
||||
|
||||
const char* c = up ? (down ? "┃" : "╹") : (down ? "╻" : " "); // NOLINT
|
||||
screen.PixelAt(x, y) = Pixel();
|
||||
|
Reference in New Issue
Block a user