undo fixing the corners for now, it doesn't work on master anyways
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoI_xD 2026-04-08 20:00:59 -07:00
commit ba917c8b13

View file

@ -143,13 +143,12 @@ void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color, int rounde
int x = (roundness + 2); int x = (roundness + 2);
int y = rect->y + (roundness + 2); int y = rect->y + (roundness + 2);
double point = ((i + (M_PI * 4)) / div); double point = ((i + (M_PI * 4)) / div);
double point2 = (((i + 1) + (M_PI * 4)) / div);
r.x = (roundness + 4) - (sin(point) * roundness); r.x = (roundness + 4) - (sin(point) * roundness);
r.y = y + (cos(point) * roundness) + 1; r.y = y + (cos(point) * roundness) + 1;
r.width = roundness; r.width = roundness;
r.height = (rect->height - ((r.y - rect->y) * 2) - 1); r.height = (rect->height - ((r.y - rect->y) * 2) - 1);
MwLLDrawPixmap(handle->lowlevel, &r, pixmap); MwLLDrawPixmap(handle->lowlevel, &r, pixmap);
r.width = x + (sin(point2) * roundness); r.width = x + (sin(point + 1) * roundness);
r.x = ((rect->width - (roundness + 1)) + (sin(point) * roundness)) - r.width; r.x = ((rect->width - (roundness + 1)) + (sin(point) * roundness)) - r.width;
MwLLDrawPixmap(handle->lowlevel, &r, pixmap); MwLLDrawPixmap(handle->lowlevel, &r, pixmap);
} }
@ -198,12 +197,14 @@ void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert
if(rect->width <= 0 || rect->height <= 0) return; if(rect->width <= 0 || rect->height <= 0) return;
if(border) { if(border) {
if(!handle->lowlevel->common.supports_transparency) {
MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground));
if(c != NULL) { if(c != NULL) {
MwDrawRect(handle, rect, c); MwDrawRect(handle, rect, c);
MwLLFreeColor(c); MwLLFreeColor(c);
} }
}
MwDrawFrame(handle, rect, color, invert, rounded); MwDrawFrame(handle, rect, color, invert, rounded);
} }
@ -357,14 +358,13 @@ static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighte
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) { for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
MwPoint line[2]; MwPoint line[2];
double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS)); double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
double point2 = (((i + 2) + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
int x = rect->x + (roundness + 2); int x = rect->x + (roundness + 2);
int y = rect->y + (roundness + 2); int y = rect->y + (roundness + 2);
line[0].x = x - (sin(point) * roundness); line[0].x = x - (sin(point) * roundness);
line[0].y = y + (cos(point) * roundness); line[0].y = y + (cos(point) * roundness);
line[1].x = x - (sin(point2) * roundness); line[1].x = x - (sin(point + 1) * roundness);
line[1].y = y + (cos(point2) * roundness); line[1].y = y + (cos(point + 1) * roundness);
MwLLLine(handle->lowlevel, line, invert ? lighter : darker); MwLLLine(handle->lowlevel, line, invert ? lighter : darker);
} }
@ -391,14 +391,13 @@ static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighte
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) { for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
MwPoint line[2]; MwPoint line[2];
double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS)); double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
double point2 = (((i + 1) + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
int x = (rect->x + rect->width) - (roundness + 2); int x = (rect->x + rect->width) - (roundness + 2);
int y = rect->y + (roundness + 2); int y = rect->y + (roundness + 2);
double placeholder = (sin(point) * roundness); double placeholder = (sin(point) * roundness);
line[0].x = x + placeholder; line[0].x = x + placeholder;
line[0].y = y + (cos(point) * roundness); line[0].y = y + (cos(point) * roundness);
line[1].x = x + (sin(point2) * roundness); line[1].x = x + (sin(point + 1) * roundness);
line[1].y = y + (cos(point2) * roundness); line[1].y = y + (cos(point + 1) * roundness);
MwLLLine(handle->lowlevel, line, invert ? lighter : darker); MwLLLine(handle->lowlevel, line, invert ? lighter : darker);
} }
} else { } else {
@ -426,14 +425,13 @@ static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighte
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) { for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
MwPoint line[2]; MwPoint line[2];
double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS)); double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
double point2 = (((i + 1) + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
int x = rect->x + (roundness + 2); int x = rect->x + (roundness + 2);
int y = (rect->y + rect->height) - (roundness + 2); int y = (rect->y + rect->height) - (roundness + 2);
line[0].x = x - (sin(point) * roundness); line[0].x = x - (sin(point) * roundness);
line[0].y = y - (cos(point) * roundness); line[0].y = y - (cos(point) * roundness);
line[1].x = x - (sin(point2) * roundness); line[1].x = x - (sin(point + 1) * roundness);
line[1].y = y - (cos(point2) * roundness); line[1].y = y - (cos(point + 1) * roundness);
MwLLLine(handle->lowlevel, line, invert ? lighter : darker); MwLLLine(handle->lowlevel, line, invert ? lighter : darker);
} }
p[0].x = rect->x + roundness; p[0].x = rect->x + roundness;
@ -463,14 +461,13 @@ static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighte
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) { for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
MwPoint line[2]; MwPoint line[2];
double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS)); double point = ((i + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
double point2 = (((i + 2) + (M_PI * (BORDER_SMOOTHNESS / 2.))) / (BORDER_SMOOTHNESS));
int x = (rect->x + rect->width) - (roundness + 2); int x = (rect->x + rect->width) - (roundness + 2);
int y = (rect->y + rect->height) - (roundness + 2); int y = (rect->y + rect->height) - (roundness + 2);
line[0].x = x + (sin(point) * roundness); line[0].x = x + (sin(point) * roundness);
line[0].y = y - (cos(point) * roundness); line[0].y = y - (cos(point) * roundness);
line[1].x = x + (sin(point2) * roundness); line[1].x = x + (sin(point + 1) * roundness);
line[1].y = y - (cos(point2) * roundness); line[1].y = y - (cos(point + 1) * roundness);
MwLLLine(handle->lowlevel, line, invert ? lighter : darker); MwLLLine(handle->lowlevel, line, invert ? lighter : darker);
} }
} else { } else {