--- a/ui/cocoa/text.m Sun Sep 07 11:57:01 2025 +0200 +++ b/ui/cocoa/text.m Thu Oct 02 13:15:21 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];