зеркало из https://github.com/mozilla/pjs.git
Added additional border style for dialogs
This commit is contained in:
Родитель
f817c58313
Коммит
42462ddadd
|
@ -95,7 +95,9 @@ enum nsBorderStyle {
|
||||||
///no border
|
///no border
|
||||||
eBorderStyle_none,
|
eBorderStyle_none,
|
||||||
///dialog box border + title area
|
///dialog box border + title area
|
||||||
eBorderStyle_dialog
|
eBorderStyle_dialog,
|
||||||
|
///window border
|
||||||
|
eBorderStyle_window
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,12 +134,14 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow)
|
||||||
|
|
||||||
struct nsWidgetInitData {
|
struct nsWidgetInitData {
|
||||||
nsWidgetInitData()
|
nsWidgetInitData()
|
||||||
: clipChildren(PR_FALSE)
|
: clipChildren(PR_FALSE),
|
||||||
|
mBorderStyle(eBorderStyle_window)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// when painting exclude area occupied by child windows
|
// when painting exclude area occupied by child windows
|
||||||
PRPackedBool clipChildren;
|
PRPackedBool clipChildren;
|
||||||
|
nsBorderStyle mBorderStyle;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -483,17 +483,19 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent,
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND parent;
|
HWND parent;
|
||||||
if (nsnull != aParent) {
|
if (nsnull != aParent) { // has a nsIWidget parent
|
||||||
// has a nsIWidget parent
|
|
||||||
parent = ((aParent) ? (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW) : nsnull);
|
parent = ((aParent) ? (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW) : nsnull);
|
||||||
aParent->AddChild(this);
|
aParent->AddChild(this);
|
||||||
}
|
} else { // has a nsNative parent
|
||||||
else {
|
|
||||||
// has a nsNative parent
|
|
||||||
parent = (HWND)aNativeParent;
|
parent = (HWND)aNativeParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
mWnd = ::CreateWindowEx(WindowExStyle(),
|
DWORD extendedStyle = WindowExStyle();
|
||||||
|
if (nsnull != aInitData && aInitData->mBorderStyle == eBorderStyle_dialog) {
|
||||||
|
extendedStyle = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mWnd = ::CreateWindowEx(extendedStyle,
|
||||||
WindowClass(),
|
WindowClass(),
|
||||||
"",
|
"",
|
||||||
style,
|
style,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче