comparison ios/dw.m @ 2674:dd0b29320a3d

iOS: Use the claimed default value for the navigation bar of 44 points. Then check to see if the intrinsicContentSize is different for us. It is reporting a point size of 50 for me which corrects the look. Also even more unicode in mobile.txt.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 18 Oct 2021 20:50:55 +0000
parents a39e2ea6fa14
children 24fb27a1e039
comparison
equal deleted inserted replaced
2673:a39e2ea6fa14 2674:dd0b29320a3d
8069 NSString *nstitle = [NSString stringWithUTF8String:title]; 8069 NSString *nstitle = [NSString stringWithUTF8String:title];
8070 [window setLargeContentTitle:nstitle]; 8070 [window setLargeContentTitle:nstitle];
8071 if(flStyle & DW_FCF_TITLEBAR) 8071 if(flStyle & DW_FCF_TITLEBAR)
8072 { 8072 {
8073 NSInteger sbheight = [[[window windowScene] statusBarManager] statusBarFrame].size.height; 8073 NSInteger sbheight = [[[window windowScene] statusBarManager] statusBarFrame].size.height;
8074 UINavigationBar* navbar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, sbheight, screenrect.size.width, 40)]; 8074 CGRect navrect = CGRectMake(0, sbheight, screenrect.size.width, 44);
8075 UINavigationBar* navbar = [[UINavigationBar alloc] initWithFrame:navrect];
8075 UINavigationItem* navItem = [[UINavigationItem alloc] initWithTitle:nstitle]; 8076 UINavigationItem* navItem = [[UINavigationItem alloc] initWithTitle:nstitle];
8077
8078 /* Double check the intrinsic height... */
8079 CGSize navdefault = [navbar intrinsicContentSize];
8080 if(navdefault.height != navrect.size.height)
8081 {
8082 navrect.size.height = navdefault.height;
8083 navbar.frame = navrect;
8084 }
8076 8085
8077 /* We maintain a list of top-level windows...If there is more than one window, 8086 /* We maintain a list of top-level windows...If there is more than one window,
8078 * and our window has the close button style, add a Back button that will close it. 8087 * and our window has the close button style, add a Back button that will close it.
8079 */ 8088 */
8080 if([_dw_toplevel_windows count] > 1 && flStyle & DW_FCF_CLOSEBUTTON) 8089 if([_dw_toplevel_windows count] > 1 && flStyle & DW_FCF_CLOSEBUTTON)