Make INDENTATION GREAT AGAIN!

This commit is contained in:
2025-10-18 18:22:10 +02:00
parent f5faf5ae8c
commit c7f218da30

20
box.c
View File

@@ -18,9 +18,12 @@
static void draw_rectangle(double x, double y, double width, double height);
static void draw_chart(struct box *, double x, double y, double width, double height);
static void draw_container(struct box *, double x, double y, double width, double height);
static void draw_button(struct box *, double x, double y, double width, double height);
static void draw_chart(struct box *, double x, double y, double width,
double height);
static void draw_container(struct box *, double x, double y, double width,
double height);
static void draw_button(struct box *, double x, double y, double width,
double height);
void
@@ -87,7 +90,8 @@ draw_chart(struct box *chart, double x, double y, double width, double height)
for (size_t i = 0; i < width; i++) {
diff = (double)rand() / RAND_MAX - 0.6;
actual_diff = (size_t)(height + y - price) - (size_t)(height + y - (price + diff));
actual_diff = (size_t)(height + y - price)
- (size_t)(height + y - (price + diff));
if (actual_diff > 0) {
color = UI_GREEN;
@@ -145,8 +149,12 @@ draw_container(struct box *b, double x, double y, double width, double height)
length = child->fills * pixels_per_fill;
switch (b->type) {
case BOX_VERTICAL: draw_box(child, x, current, width, length); break;
case BOX_HORIZONTAL: draw_box(child, current, y, length, height); break;
case BOX_VERTICAL:
draw_box(child, x, current, width, length);
break;
case BOX_HORIZONTAL:
draw_box(child, current, y, length, height);
break;
}
current += length;