зеркало из 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
|
||||
eBorderStyle_none,
|
||||
///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 {
|
||||
nsWidgetInitData()
|
||||
: clipChildren(PR_FALSE)
|
||||
: clipChildren(PR_FALSE),
|
||||
mBorderStyle(eBorderStyle_window)
|
||||
{
|
||||
}
|
||||
|
||||
// when painting exclude area occupied by child windows
|
||||
PRPackedBool clipChildren;
|
||||
nsBorderStyle mBorderStyle;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -483,17 +483,19 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent,
|
|||
}
|
||||
|
||||
HWND parent;
|
||||
if (nsnull != aParent) {
|
||||
// has a nsIWidget parent
|
||||
if (nsnull != aParent) { // has a nsIWidget parent
|
||||
parent = ((aParent) ? (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW) : nsnull);
|
||||
aParent->AddChild(this);
|
||||
}
|
||||
else {
|
||||
// has a nsNative parent
|
||||
} else { // has a nsNative parent
|
||||
parent = (HWND)aNativeParent;
|
||||
}
|
||||
|
||||
mWnd = ::CreateWindowEx(WindowExStyle(),
|
||||
DWORD extendedStyle = WindowExStyle();
|
||||
if (nsnull != aInitData && aInitData->mBorderStyle == eBorderStyle_dialog) {
|
||||
extendedStyle = 0;
|
||||
}
|
||||
|
||||
mWnd = ::CreateWindowEx(extendedStyle,
|
||||
WindowClass(),
|
||||
"",
|
||||
style,
|
||||
|
|
Загрузка…
Ссылка в новой задаче