Mercurial > dwindows
comparison ios/dw.m @ 2679:fd223faa7690
iOS: Checkboxes and radiobuttons should be left aligned not centered.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 24 Oct 2021 23:14:37 +0000 |
parents | 24fb27a1e039 |
children | 1888d0a08365 |
comparison
equal
deleted
inserted
replaced
2678:24fb27a1e039 | 2679:fd223faa7690 |
---|---|
1536 | 1536 |
1537 if(state) | 1537 if(state) |
1538 imagename = @"checkmark.square"; | 1538 imagename = @"checkmark.square"; |
1539 else | 1539 else |
1540 imagename = @"square"; | 1540 imagename = @"square"; |
1541 [self setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft]; | |
1541 } | 1542 } |
1542 break; | 1543 break; |
1543 case _DW_BUTTON_TYPE_RADIO: | 1544 case _DW_BUTTON_TYPE_RADIO: |
1544 { | 1545 { |
1545 if(state) | 1546 if(state) |
1546 imagename = @"largecircle.fill.circle"; | 1547 imagename = @"largecircle.fill.circle"; |
1547 else | 1548 else |
1548 imagename = @"circle"; | 1549 imagename = @"circle"; |
1550 [self setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft]; | |
1549 } | 1551 } |
1550 break; | 1552 break; |
1553 default: | |
1554 [self setContentHorizontalAlignment:UIControlContentHorizontalAlignmentCenter]; | |
1551 } | 1555 } |
1552 if(imagename) | 1556 if(imagename) |
1553 { | 1557 { |
1554 UIImage *image = [UIImage systemImageNamed:imagename]; | 1558 UIImage *image = [UIImage systemImageNamed:imagename]; |
1555 CGSize size = [image size]; | 1559 CGSize size = [image size]; |