Skip to content

Commit

Permalink
NXTAlert: fixed accessory view calculations.
Browse files Browse the repository at this point in the history
  • Loading branch information
trunkmaster committed Aug 8, 2024
1 parent 2c801cc commit d7fb60d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Frameworks/DesktopKit/NXTAlert.m
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,7 @@ - (void)sizeToFitScreenSize:(NSSize)screenSize
if (accessoryView) {
NSRect avFrame, mvFrame;
NSButton *button = buttons[0];
CGFloat additionalHeight = avFrame.size.height + 10;

// Enlarge panel height
panelFrame.size.height += additionalHeight;
panelFrame.origin.y -= additionalHeight;
CGFloat additionalHeight;

// Setup accessory view frame
avFrame = accessoryView.frame;
Expand All @@ -385,6 +381,11 @@ - (void)sizeToFitScreenSize:(NSSize)screenSize
avFrame.origin.y = button.frame.origin.y + button.frame.size.height + 10;
[accessoryView setFrame:avFrame];

// Enlarge panel height
additionalHeight = avFrame.size.height + 10;
panelFrame.size.height += additionalHeight;
panelFrame.origin.y -= additionalHeight;

// Move message view up
mvFrame = messageView.frame;
mvFrame.origin.y += additionalHeight;
Expand Down

0 comments on commit d7fb60d

Please sign in to comment.