Fixed a whole bunch of sizing issues on the Windows backend.
This commit is contained in:
parent
862b0402b9
commit
9a3bffe566
|
@ -186,6 +186,9 @@ static void boxRelayout(uiWindowsControl *c, intmax_t x, intmax_t y, intmax_t wi
|
|||
}
|
||||
|
||||
// 3) now we can position controls
|
||||
// first, make relative to the top-left corner of the container
|
||||
x = 0;
|
||||
y = 0;
|
||||
for (i = 0; i < b->controls->len; i++) {
|
||||
bc = ptrArrayIndex(b->controls, struct child *, i);
|
||||
//TODO if (!uiControlContainerVisible(bc->c))
|
||||
|
|
|
@ -117,7 +117,6 @@ static void tabRelayout(uiWindowsControl *c, intmax_t x, intmax_t y, intmax_t wi
|
|||
|
||||
// now we need to figure out what rect the child goes
|
||||
// this rect needs to be in parent window coordinates, but TCM_ADJUSTRECT wants a window rect, which is screen coordinates
|
||||
printf("%d %d %d %d -> ", (int)x, (int)y, (int)width, (int)height);
|
||||
r.left = x;
|
||||
r.top = y;
|
||||
r.right = x + width;
|
||||
|
@ -126,7 +125,7 @@ printf("%d %d %d %d -> ", (int)x, (int)y, (int)width, (int)height);
|
|||
mapWindowRect(t->hwnd, NULL, &r);
|
||||
SendMessageW(t->hwnd, TCM_ADJUSTRECT, (WPARAM) FALSE, (LPARAM) (&r));
|
||||
mapWindowRect(NULL, t->hwnd, &r);
|
||||
printf("%d %d %d %d\n", (int)r.left, (int)r.top, (int)r.right-r.left, (int)r.bottom-r.top);
|
||||
|
||||
childRelayout(page, r.left, r.top, r.right - r.left, r.bottom - r.top);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,5 +58,8 @@ HWND newTabPage(void)
|
|||
if (hr != S_OK)
|
||||
logHRESULT("error setting tab page background in newTabPage()", hr);
|
||||
|
||||
// and start the tab page hidden
|
||||
ShowWindow(hwnd, SW_HIDE);
|
||||
|
||||
return hwnd;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue