ui/gtk/text.c

changeset 788
27f126f6e361
parent 680
a4795b40e679
child 801
e096c441e874
equal deleted inserted replaced
787:91205084a852 788:27f126f6e361
614 "destroy", 614 "destroy",
615 G_CALLBACK(ui_textfield_destroy), 615 G_CALLBACK(ui_textfield_destroy),
616 uitext); 616 uitext);
617 617
618 if(args->width > 0) { 618 if(args->width > 0) {
619 // TODO: gtk4 619 // An early implementation used gtk_entry_set_width_chars,
620 #if GTK_MAJOR_VERSION <= 3 620 // but that is not available on gtk4 and other toolkits
621 gtk_entry_set_width_chars(GTK_ENTRY(textfield), args->width); 621 // also don't have this. Setting the width in pixels can
622 #endif 622 // be implemented on all platforms
623 gtk_widget_set_size_request(textfield, args->width, -1);
623 } 624 }
624 if(frameless) { 625 if(frameless) {
625 // TODO: gtk2legacy workaroud 626 // TODO: gtk2legacy workaroud
626 gtk_entry_set_has_frame(GTK_ENTRY(textfield), FALSE); 627 gtk_entry_set_has_frame(GTK_ENTRY(textfield), FALSE);
627 } 628 }

mercurial