From f7e2d0029db91e983339522be40fe6d635d0ce06 Mon Sep 17 00:00:00 2001 From: Dzmitry Neviadomski Date: Sat, 9 Jan 2021 13:46:24 +0300 Subject: [PATCH] Align Info Inspector with app's MainWindow. --- Base.lproj/InfoInspector.xib | 62 ++++++++++++++-------------- InfoInspector/InfoWindowController.m | 11 ++++- 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/Base.lproj/InfoInspector.xib b/Base.lproj/InfoInspector.xib index cc89e557a..2c9296052 100644 --- a/Base.lproj/InfoInspector.xib +++ b/Base.lproj/InfoInspector.xib @@ -1,8 +1,8 @@ - + - + @@ -13,18 +13,17 @@ - - - + + - + - + @@ -33,7 +32,7 @@ - + @@ -42,7 +41,7 @@ - + @@ -51,7 +50,7 @@ - + @@ -60,7 +59,7 @@ - + @@ -69,7 +68,7 @@ - + @@ -78,7 +77,7 @@ - + @@ -87,7 +86,7 @@ - + @@ -96,7 +95,7 @@ - + @@ -105,7 +104,7 @@ - + @@ -114,7 +113,7 @@ - + @@ -123,7 +122,7 @@ - + @@ -135,7 +134,7 @@ - + @@ -147,7 +146,7 @@ - + @@ -159,7 +158,7 @@ - + @@ -172,7 +171,7 @@ - + @@ -185,7 +184,7 @@ - + @@ -200,7 +199,7 @@ - + @@ -212,7 +211,7 @@ - + @@ -224,7 +223,7 @@ - + @@ -236,7 +235,7 @@ - + @@ -248,7 +247,7 @@ - + @@ -260,7 +259,7 @@ - + @@ -269,7 +268,7 @@ - + @@ -281,7 +280,7 @@ - + @@ -297,6 +296,7 @@ + diff --git a/InfoInspector/InfoWindowController.m b/InfoInspector/InfoWindowController.m index d7afa74f5..2806952f0 100644 --- a/InfoInspector/InfoWindowController.m +++ b/InfoInspector/InfoWindowController.m @@ -55,8 +55,15 @@ { if ([[self window] isVisible]) [[self window] orderOut:self]; - else - [self showWindow:self]; + else { + if ([NSApp mainWindow]) { + NSRect rect = [[NSApp mainWindow] frame]; + // Align Info Inspector HUD Panel to the right of Main Window. + NSPoint point = NSMakePoint(NSMaxX(rect), NSMaxY(rect)); + [[self window] setFrameTopLeftPoint:point]; + } + [self showWindow:self]; + } } @end