ui fix resolutionSelector auto width

This commit is contained in:
hbouhadji
2022-02-05 18:09:43 +01:00
committed by Cameron Gutman
parent 29ba055024
commit b7ba94f77a

View File

@@ -318,6 +318,7 @@ CGSize resolutionTable[RESOLUTION_TABLE_SIZE];
if (!customResolutionEqualsDefaultResolution) {
NSString *newTitle = [NSString stringWithFormat:@"Custom %dx%d", (int) resolutionTable[RESOLUTION_TABLE_CUSTOM_INDEX].width, (int) resolutionTable[RESOLUTION_TABLE_CUSTOM_INDEX].height];
[self.resolutionSelector setTitle:newTitle forSegmentAtIndex:[self.resolutionSelector numberOfSegments] - 1];
self.resolutionSelector.apportionsSegmentWidthsByContent = YES; // to update the width
}
}