зеркало из https://github.com/mozilla/gecko-dev.git
Bug 622328 - Limit glass margin adjustments to kGlassMarginAdjustment for frames that hold opaque content. r=roc, a=blocking.
This commit is contained in:
Родитель
8fbd9a0bf9
Коммит
b918e3ca62
|
@ -2649,12 +2649,18 @@ void nsWindow::UpdateGlass()
|
|||
DWMNCRENDERINGPOLICY policy = DWMNCRP_USEWINDOWSTYLE;
|
||||
switch (mTransparencyMode) {
|
||||
case eTransparencyBorderlessGlass:
|
||||
// Only adjust if there is some opaque rectangle
|
||||
// Margins must be 2px (kGlassMarginAdjustment) or larger to cover the 2px
|
||||
// border Windows adds. A value of -1 in cxLeftWidth indicates a sheet of
|
||||
// glass which we ignore here.
|
||||
if (margins.cxLeftWidth >= 0) {
|
||||
margins.cxLeftWidth += kGlassMarginAdjustment;
|
||||
margins.cyTopHeight += kGlassMarginAdjustment;
|
||||
margins.cxRightWidth += kGlassMarginAdjustment;
|
||||
margins.cyBottomHeight += kGlassMarginAdjustment;
|
||||
if (margins.cxLeftWidth >= 0 && margins.cxLeftWidth < kGlassMarginAdjustment)
|
||||
margins.cxLeftWidth = kGlassMarginAdjustment;
|
||||
if (margins.cyTopHeight >= 0 && margins.cyTopHeight < kGlassMarginAdjustment)
|
||||
margins.cyTopHeight = kGlassMarginAdjustment;
|
||||
if (margins.cxRightWidth >= 0 && margins.cxRightWidth < kGlassMarginAdjustment)
|
||||
margins.cxRightWidth = kGlassMarginAdjustment;
|
||||
if (margins.cyBottomHeight >= 0 && margins.cyBottomHeight < kGlassMarginAdjustment)
|
||||
margins.cyBottomHeight = kGlassMarginAdjustment;
|
||||
}
|
||||
// Fall through
|
||||
case eTransparencyGlass:
|
||||
|
@ -2662,6 +2668,11 @@ void nsWindow::UpdateGlass()
|
|||
break;
|
||||
}
|
||||
|
||||
PR_LOG(gWindowsLog, PR_LOG_ALWAYS,
|
||||
("glass margins: left:%d top:%d right:%d bottom:%d\n",
|
||||
margins.cxLeftWidth, margins.cyTopHeight,
|
||||
margins.cxRightWidth, margins.cyBottomHeight));
|
||||
|
||||
// Extends the window frame behind the client area
|
||||
if(nsUXThemeData::CheckForCompositor()) {
|
||||
nsUXThemeData::dwmExtendFrameIntoClientAreaPtr(hWnd, &margins);
|
||||
|
|
Загрузка…
Ссылка в новой задаче