2 days ago
another textview/scrollview layout fix (Cocoa)
ui/cocoa/text.m | file | annotate | diff | comparison | revisions |
--- a/ui/cocoa/text.m Sun Mar 30 16:52:33 2025 +0200 +++ b/ui/cocoa/text.m Sun Mar 30 17:06:27 2025 +0200 @@ -33,10 +33,11 @@ UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs args) { NSTextView *textview = [[NSTextView alloc] init]; - textview.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; + textview.autoresizingMask = NSViewWidthSizable; + textview.minSize = NSMakeSize(0, 0); + textview.maxSize = NSMakeSize(FLT_MAX, FLT_MAX); NSScrollView *scrollview = [[NSScrollView alloc] init]; - scrollview.translatesAutoresizingMaskIntoConstraints = NO; scrollview.hasVerticalScroller = YES; scrollview.documentView = textview;