On 7/23/14, 5:54 PM, Yonggang Luo wrote:
If you want the background clipped to the rounded border, and the

rounded border to be on the root, then you can't do that.

Is that possible to dynamic creating the border/background of the root,
by modify the underling code in mozilla source code.
That's possible at least on windows. It seems you need to clip the root window to the rounded border on windows. On windows, the shape of the root window is rectangle and cannot be changed by css style. If you want to customize the window shape, say, making rounded border, you should do that by calling windows API - SetWindowRgn[1]. The
code may look like this:

    // The root window handle
    HWND hWnd = ...;

    RECT rect;
    GetWindowRect(hWnd, &rect);
    INT32 width = rect.right - rect.left;
    INT32 height = rect.bottom - rect.top;
    SetWindowRoundRgn(hWnd, width, height, iCornerWidth, iCornetHeight);

void SetWindowRoundRgn(HWND hWnd, INT32 iWidth, INT32 iHeight, INT32 iCornerWidth, INT32 iCornetHeight)
   {
HRGN hRgn = CreateRoundRectRgn(0, 0, iWidth , iHeight, iCornerWidth, iCornetHeight);
     SetWindowRgn(hWnd, hRgn, true);
     DeleteObject(hRgn);
   }

[1] http://msdn.microsoft.com/en-us/library/aa930600.aspx

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to