Skip to content

Commit

Permalink
macosx: Fix broken empty library view dictionaries of variable bindings
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and robUx4 committed Oct 1, 2024
1 parent 2a4fe7d commit 915ce30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,10 @@ - (void)presentPlaceholderAudioView
} else {
self.libraryTargetView.subviews = @[self.emptyLibraryView];
}
NSDictionary * const dict = NSDictionaryOfVariableBindings(self.emptyLibraryView);
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[self.emptyLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[self.emptyLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
NSView * const emptyLibraryView = self.emptyLibraryView;
NSDictionary * const dict = NSDictionaryOfVariableBindings(emptyLibraryView);
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[emptyLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[emptyLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];

self.emptyLibraryView.identifier = VLCLibraryPlaceholderAudioViewIdentifier;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,10 @@ - (void)presentPlaceholderHomeLibraryView
} else {
self.libraryTargetView.subviews = @[self.emptyLibraryView];
}
NSDictionary * const dict = NSDictionaryOfVariableBindings(self.emptyLibraryView);
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_emptyLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_emptyLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
NSView * const emptyLibraryView = self.emptyLibraryView;
NSDictionary * const dict = NSDictionaryOfVariableBindings(emptyLibraryView);
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[emptyLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[self.libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[emptyLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];

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.");
Expand Down

0 comments on commit 915ce30

Please sign in to comment.