Skip to content

Commit

Permalink
Fix macOS Sonoma OSLabel clip
Browse files Browse the repository at this point in the history
  • Loading branch information
frang75 committed Mar 18, 2024
1 parent 78657b2 commit d7930ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@

* macOS Sonoma NSMenu check obsolete. [Doc](https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-14#Menus). [Issue](https://github.com/frang75/nappgui_src/issues/96). [Commit](https://github.com/frang75/nappgui_src/commit/197c7db6c41b8bde7e01532d4943ee95d4e8ca7e).

* macOS Sonoma OSLabel clipping.

* Windows XP THEME issue. [Commit](https://github.com/frang75/nappgui_src/commit/7f4d10bbd53a26c3e6719c859ab585bb53d6888f).

* `modifiers` field in `EvKey` issue. [Issue](https://github.com/frang75/nappgui_src/issues/95). [Commit](https://github.com/frang75/nappgui_src/commit/68a59be2fd922f0738daeba10fbfb82ed779a693).
Expand Down
2 changes: 1 addition & 1 deletion prj/build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4982
4984
6 changes: 6 additions & 0 deletions src/osgui/osx/oslabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ - (void) drawRect:(NSRect)rect
OSXLabel *label = nil;
heap_auditor_add("OSXLabel");
label = [[OSXLabel alloc] initWithFrame:NSZeroRect];

/* https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-14#NSView */
#if defined (MAC_OS_VERSION_14_0) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_14
[label setClipsToBounds:YES];
#endif

_oscontrol_init(label);
label->ctx = dctx_create();
label->flags = flags;
Expand Down

0 comments on commit d7930ef

Please sign in to comment.