Reimplemented window margins.
This commit is contained in:
parent
27e7057672
commit
95646538f7
|
@ -192,10 +192,13 @@ static void windowResizeChild(uiWindow *ww)
|
||||||
return;
|
return;
|
||||||
if (GetClientRect(w->hwnd, &r) == 0)
|
if (GetClientRect(w->hwnd, &r) == 0)
|
||||||
logLastError("error getting uiWindow client rect in windowComputeChildSize()");
|
logLastError("error getting uiWindow client rect in windowComputeChildSize()");
|
||||||
if (w->margined) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
d = uiControlSizing(uiControl(w));
|
d = uiControlSizing(uiControl(w));
|
||||||
|
if (w->margined) {
|
||||||
|
r.left += uiWindowsDlgUnitsToX(windowMargin, d->Sys->BaseX);
|
||||||
|
r.top += uiWindowsDlgUnitsToY(windowMargin, d->Sys->BaseY);
|
||||||
|
r.right -= uiWindowsDlgUnitsToX(windowMargin, d->Sys->BaseX);
|
||||||
|
r.bottom -= uiWindowsDlgUnitsToY(windowMargin, d->Sys->BaseY);
|
||||||
|
}
|
||||||
uiControlResize(w->child, r.left, r.top, r.right - r.left, r.bottom - r.top, d);
|
uiControlResize(w->child, r.left, r.top, r.right - r.left, r.bottom - r.top, d);
|
||||||
uiFreeSizing(d);
|
uiFreeSizing(d);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue