This commit is contained in:
parent
1c2cd6e875
commit
ad49a55812
6 changed files with 35 additions and 10 deletions
|
|
@ -307,6 +307,8 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
|
|||
r->gdi.cursor = NULL;
|
||||
r->gdi.icon = NULL;
|
||||
|
||||
r->gdi.clip = NULL;
|
||||
|
||||
u->ll = r;
|
||||
u->min_set = 0;
|
||||
u->max_set = 0;
|
||||
|
|
@ -340,6 +342,8 @@ static void MwLLDestroyImpl(MwLL handle) {
|
|||
SetWindowLongPtr(handle->gdi.hWnd, GWLP_USERDATA, (LPARAM)NULL);
|
||||
DestroyWindow(handle->gdi.hWnd);
|
||||
|
||||
if(handle->gdi.clip != NULL) DeleteObject(handle->gdi.clip);
|
||||
|
||||
if(handle->gdi.cursor != NULL) DestroyCursor(handle->gdi.cursor);
|
||||
|
||||
free(handle);
|
||||
|
|
@ -883,8 +887,22 @@ static void MwLLRaiseImpl(MwLL handle) {
|
|||
}
|
||||
|
||||
static void MwLLClipImpl(MwLL handle, MwRect* rect) {
|
||||
(void)handle;
|
||||
(void)rect;
|
||||
if(rect == NULL){
|
||||
SelectClipRgn(handle->gdi.hDC, NULL);
|
||||
|
||||
if(handle->gdi.clip != NULL){
|
||||
DeleteObject(handle->gdi.clip);
|
||||
handle->gdi.clip = NULL;
|
||||
}
|
||||
}else{
|
||||
HRGN clip = CreateRectRgn(rect->x, rect->y, rect->x + rect->width, rect->y + rect->height);
|
||||
|
||||
SelectClipRgn(handle->gdi.hDC, clip);
|
||||
|
||||
if(handle->gdi.clip != NULL) DeleteObject(handle->gdi.clip);
|
||||
|
||||
handle->gdi.clip = clip;
|
||||
}
|
||||
}
|
||||
|
||||
static int MwLLGDICallInitImpl(void) {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ static void draw(MwWidget handle) {
|
|||
if(render) {
|
||||
MwPoint p;
|
||||
|
||||
if(n == 1 && arrlen(t->names) > 1 && i > 0) {
|
||||
if(n == 1 && i > 0) {
|
||||
MwRect r3 = r2;
|
||||
|
||||
r3.y = tab_height(handle);
|
||||
|
|
@ -98,7 +98,7 @@ static void draw(MwWidget handle) {
|
|||
MwLLClip(handle->lowlevel, NULL);
|
||||
}
|
||||
|
||||
if(n == 1 && arrlen(t->names) > 1 && i < (arrlen(t->names) - 1)) {
|
||||
if(n == 1 && i < (arrlen(t->names) - 1)) {
|
||||
MwRect r3 = r2;
|
||||
|
||||
r3.x += r2.width - MwDefaultBorderWidth(handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue