This commit is contained in:
parent
ad49a55812
commit
bf5ab45f2e
6 changed files with 57 additions and 5 deletions
|
|
@ -591,6 +591,11 @@ static void clip(MwLL handle) {
|
|||
cairo_rectangle(handle->wayland.front_cairo, cx - x, cy - y, mx - cx, my - cy);
|
||||
cairo_clip(handle->wayland.front_cairo);
|
||||
}
|
||||
|
||||
if(handle->wayland.is_clipping){
|
||||
cairo_rectangle(handle->wayland.front_cairo, handle->wayland.clip.x, handle->wayland.clip.y, handle->wayland.clip.width, handle->wayland.clip.height);
|
||||
cairo_clip(handle->wayland.front_cairo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -700,6 +705,7 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
|
|||
}
|
||||
|
||||
r->wayland.is_toplevel = parent == NULL;
|
||||
r->wayland.is_clipping = 0;
|
||||
|
||||
widget_setup(r, parent, x, y, width, height, MwLL_WAYLAND_UNKNOWN);
|
||||
|
||||
|
|
@ -1597,8 +1603,11 @@ static void MwLLRaiseImpl(MwLL handle) {
|
|||
}
|
||||
|
||||
static void MwLLClipImpl(MwLL handle, MwRect* rect) {
|
||||
(void)handle;
|
||||
(void)rect;
|
||||
if(rect == NULL){
|
||||
handle->wayland.is_clipping = MwFALSE;
|
||||
}else{
|
||||
handle->wayland.clip = *rect;
|
||||
}
|
||||
}
|
||||
|
||||
static int MwLLWaylandCallInitImpl(void) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ int MwDefaultBorderWidth(MwWidget handle) {
|
|||
if(bw != MwDEFAULT) return bw;
|
||||
|
||||
if(MwGetInteger(handle, MwNmodernLook)) {
|
||||
return 1;
|
||||
return 2;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,13 +359,13 @@ static void MwDrawFrameEx_complex(MwWidget handle, MwRect* rect, MwLLColor color
|
|||
MwLLColor lighter = same ? MwLightenColor(handle, darker, 0, 0, 0) : MwLightenColor(handle, color, (ColorDiff / 2) - diff, (ColorDiff / 2) - diff, (ColorDiff / 2) - diff);
|
||||
MwRect r = *rect;
|
||||
|
||||
frame_border_complex(handle, rect, lighter, darker, invert, border, diff, same);
|
||||
frame_border_complex(handle, rect, lighter, darker, invert, border / 2, diff, same);
|
||||
|
||||
r.x += 1;
|
||||
r.y += 1;
|
||||
r.width -= 2;
|
||||
r.height -= 2;
|
||||
frame_border_complex(handle, &r, lighter, darker, !invert, border, diff, same);
|
||||
frame_border_complex(handle, &r, lighter, darker, !invert, border / 2, diff, same);
|
||||
|
||||
MwLLFreeColor(lighter);
|
||||
MwLLFreeColor(darker);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue