Skip to content
Snippets Groups Projects
Commit 8f2202fc authored by Claudio Cambra's avatar Claudio Cambra Committed by Steve Lhomme
Browse files

macosx: Use library window method to display placeholder view in home view controller


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent e3bd111d
No related branches found
No related tags found
1 merge request!6136macosx: Unify handling of various view's presentation
...@@ -161,24 +161,14 @@ ...@@ -161,24 +161,14 @@
- (void)presentHomeView - (void)presentHomeView
{ {
self.libraryTargetView.subviews = @[];
[self updatePresentedView]; [self updatePresentedView];
} }
- (void)presentPlaceholderHomeLibraryView - (void)presentPlaceholderHomeLibraryView
{ {
NSArray<NSLayoutConstraint *> * const oldViewPlaceholderConstraints = [self.libraryWindow displayLibraryPlaceholderViewWithImage:[NSImage imageNamed:@"placeholder-video"]
self.libraryWindow.librarySegmentViewController.placeholderImageViewSizeConstraints; usingConstraints:self.placeholderImageViewSizeConstraints
for (NSLayoutConstraint * const constraint in oldViewPlaceholderConstraints) { displayingMessage:_NS("Your favorite videos will appear here.\nGo to the Browse section to add videos you love.")];
constraint.active = NO;
}
for (NSLayoutConstraint *constraint in self.placeholderImageViewSizeConstraints) {
constraint.active = YES;
}
[self.libraryWindow displayLibraryView:self.emptyLibraryView];
self.placeholderImageView.image = [NSImage imageNamed:@"placeholder-video"];
self.placeholderLabel.stringValue = _NS("Your favorite videos will appear here.\nGo to the Browse section to add videos you love.");
} }
- (void)presentHomeLibraryView - (void)presentHomeLibraryView
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment