--- a/ui/cocoa/text.m Sun Aug 24 15:24:16 2025 +0200 +++ b/ui/cocoa/text.m Sat Oct 04 14:52:59 2025 +0200 @@ -182,7 +182,14 @@ textfield = [[NSSecureTextField alloc] init]; } else { textfield = [[NSTextField alloc] init]; - } + } + + if(!args->hfill || args->width > 0) { + textfield.translatesAutoresizingMaskIntoConstraints = NO; + int width = args->width > 0 ? args->width : 100; + [[textfield.widthAnchor constraintEqualToConstant:width] setActive:YES]; + } + if(frameless) { [textfield setBezeled: NO];