From 6685eeb4e567879bd488a62817b21d62d5af6478 Mon Sep 17 00:00:00 2001 From: Eitot Date: Wed, 27 Sep 2023 11:36:03 +0200 Subject: [PATCH] Address several drawing issues with Xcode 15 Views no clip to their bounds anymore, which allows views to draw outside of their bounds. In the browser UI, the RSS, cancel and reload buttons are hidden by setting layout constraints to zero (`updateAddressBarButtons()` in BrowserTab+Interface.swift). This causes the button icons to still be visible. This is addressed by enabling the `clipsToBounds` property in Interface Builder, which should be fully backwards compatible. For the EnclosureView, the drawing is restricted to the view's `bounds` instead of `dirtyRect`. --- Vienna/Interfaces/BrowserTab.xib | 40 +++++++++---------- .../BrowserTabWithLegacyAddressBar.xib | 34 ++++++++-------- Vienna/Sources/Main window/EnclosureView.m | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Vienna/Interfaces/BrowserTab.xib b/Vienna/Interfaces/BrowserTab.xib index e3d2f36de3..dddee26008 100644 --- a/Vienna/Interfaces/BrowserTab.xib +++ b/Vienna/Interfaces/BrowserTab.xib @@ -1,8 +1,8 @@ - + - + @@ -37,31 +37,31 @@ - + @@ -75,20 +75,20 @@ - - + - + @@ -65,37 +65,34 @@ - - - @@ -147,7 +147,7 @@ - + diff --git a/Vienna/Sources/Main window/EnclosureView.m b/Vienna/Sources/Main window/EnclosureView.m index 3b000bdc61..8c2b51c9d3 100644 --- a/Vienna/Sources/Main window/EnclosureView.m +++ b/Vienna/Sources/Main window/EnclosureView.m @@ -150,7 +150,7 @@ -(IBAction)openFile:(id)sender */ - (void)drawRect:(NSRect)rect { [[NSColor colorNamed:@"AttachmentView"] setFill]; - NSRectFill(rect); + NSRectFill(self.bounds); } /* dealloc