Browse Source

Fake titlebar is now visible

demo1
Nikita Tsukanov 6 years ago
committed by Dan Walmsley
parent
commit
afb3db9b27
  1. 27
      native/Avalonia.Native/src/OSX/window.mm

27
native/Avalonia.Native/src/OSX/window.mm

@ -1049,32 +1049,23 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
}
}
- (void)layout
{
[super layout];
}
-(void)setFrame:(NSRect)frame
{
[super setFrame:frame];
[_content setFrame:frame];
[_titleBarMaterial setFrame:frame];
}
-(void)setFrameSize:(NSSize)newSize
{
auto window = objc_cast<AvnWindow>([self window]);
[super setFrameSize:newSize];
[_content setFrameSize:newSize];
[_titleBarMaterial setFrameSize:newSize];
// TODO get actual titlebar size
float height = 38;
NSRect tbar;
tbar.origin.x = 0;
tbar.origin.y = newSize.height - height;
tbar.size.width = newSize.width;
tbar.size.height = height;
[super layout];
[_titleBarMaterial setFrame:tbar];
}
@end
@implementation AvnView

Loading…
Cancel
Save