зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1402740: Position modal sheets correctly on macOS now that titlebars are being hidden by bug 1401297. r=mstange
This commit is contained in:
Родитель
8610b0c3b3
Коммит
b473cba84d
|
@ -2560,12 +2560,11 @@ nsChildView::UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometri
|
|||
FindFirstRectOfType(aThemeGeometries, nsNativeThemeCocoa::eThemeGeometryTypeToolbox).YMost();
|
||||
|
||||
ToolbarWindow* win = (ToolbarWindow*)[mView window];
|
||||
bool drawsContentsIntoWindowFrame = [win drawsContentsIntoWindowFrame];
|
||||
int32_t titlebarHeight = CocoaPointsToDevPixels([win titlebarHeight]);
|
||||
int32_t contentOffset = drawsContentsIntoWindowFrame ? titlebarHeight : 0;
|
||||
int32_t devUnifiedHeight = titlebarHeight + unifiedToolbarBottom - contentOffset;
|
||||
int32_t devUnifiedHeight = titlebarHeight + unifiedToolbarBottom;
|
||||
[win setUnifiedToolbarHeight:DevPixelsToCocoaPoints(devUnifiedHeight)];
|
||||
int32_t devSheetPosition = titlebarHeight + std::max(toolboxBottom, unifiedToolbarBottom) - contentOffset;
|
||||
int32_t devSheetPosition = titlebarHeight +
|
||||
std::max(toolboxBottom, unifiedToolbarBottom);
|
||||
[win setSheetAttachmentPosition:DevPixelsToCocoaPoints(devSheetPosition)];
|
||||
|
||||
// Update titlebar control offsets.
|
||||
|
|
Загрузка…
Ссылка в новой задаче