mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Enclose [indicator setControlSize] in availability check
This commit is contained in:
parent
2244051453
commit
5301a924c4
@ -202,10 +202,18 @@ static NSProgressIndicator* createProgressIndicator(const NSDockTile* dockTile)
|
||||
NSView* contentView = [dockTile contentView];
|
||||
|
||||
NSProgressIndicator* indicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, contentView.frame.size.width, 15.0f)];
|
||||
|
||||
[indicator setStyle:NSProgressIndicatorStyleBar];
|
||||
[indicator setControlSize:NSControlSizeLarge];
|
||||
|
||||
if (@available(macOS 11.0, *))
|
||||
{
|
||||
[indicator setControlSize:NSControlSizeLarge];
|
||||
}
|
||||
|
||||
[indicator setMinValue:0.0f];
|
||||
[indicator setMaxValue:1.0f];
|
||||
|
||||
[indicator sizeToFit];
|
||||
|
||||
[contentView addSubview:indicator];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user