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