almost complete
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-03-27 17:26:14 +09:00
commit df50c9531c
Signed by: nishi
GPG key ID: 27EF69B208EB9343
3 changed files with 87 additions and 6 deletions

View file

@ -140,6 +140,8 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
int px = x, py = y;
XSizeHints sh;
_Xdebug = 1;
r = malloc(sizeof(*r));
MwLLCreateCommon(r);
@ -736,7 +738,7 @@ static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) {
}
static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {
if(rect->width == 0 || rect->height == 0 || pixmap->common.width == 0 || pixmap->common.height == 0) return;
if(rect->width <= 0 || rect->height <= 0 || pixmap->common.width <= 0 || pixmap->common.height <= 0) return;
#ifdef USE_XRENDER
if(pixmap->x11.image != NULL && pixmap->x11.use_xrender) {
Pixmap px = XCreatePixmap(handle->x11.display, handle->x11.window, pixmap->common.width, pixmap->common.height, pixmap->x11.depth);

View file

@ -117,7 +117,10 @@ void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color, int rounde
MwRect r = *rect;
int roundness = MwGetInteger(handle, MwNroundness);
double div;
if(rect->width < 0 || rect->height < 0) return;
if(rect->width <= 0 || rect->height <= 0){
free(data);
return;
}
if(roundness == MwDEFAULT) roundness = DEFAULT_ROUNDNESS;
if(roundness >= MAX_ROUNDNESS) roundness = MAX_ROUNDNESS;
div = (roundness <= 10) ? 7. : 10.;
@ -191,7 +194,7 @@ void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert
MwLLColor col;
MwBool rounded = MwGetInteger(handle, MwNroundness) != MwDEFAULT && MwGetInteger(handle, MwNisRounded) != 0;
if(rect->width < 0 || rect->height < 0) return;
if(rect->width <= 0 || rect->height <= 0) return;
if(border) {
if(!handle->lowlevel->common.supports_transparency) {
@ -350,7 +353,7 @@ static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighte
if(roundness == MwDEFAULT) roundness = DEFAULT_ROUNDNESS;
if(roundness >= MAX_ROUNDNESS) roundness = MAX_ROUNDNESS;
if(rounded && rect->height >= (roundness * 2) && rect->width >= (roundness * 2) && roundness > 0) {
if(rounded && rect->height >= (roundness * 4) && rect->width >= (roundness * 4) && roundness > 0) {
/* top left edge */
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
MwPoint line[2];
@ -417,7 +420,7 @@ static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighte
}
MwLLPolygon(handle->lowlevel, p, 6, invert ? lighter : darker);
if(rounded && rect->height >= (roundness * 2) && rect->width >= (roundness * 2) && roundness > 0) {
if(rounded && rect->height >= (roundness * 4) && rect->width >= (roundness * 4) && roundness > 0) {
/* bottom left edge */
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {
MwPoint line[2];