Browse Source

macosx: Add initialiser to audio group table header view to initialise with internal padding value

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
pull/200/head
Claudio Cambra 6 months ago
committed by Felix Paul Kühne
parent
commit
56c45f2747
  1. 1
      modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.h
  2. 9
      modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.m
  3. 2
      modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m

1
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.h

@ -33,6 +33,7 @@ extern const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight;
@property (nullable, nonatomic) VLCLibraryRepresentedItem *representedItem;
@property (readwrite, nonatomic) BOOL internalPaddingAddedForContentView;
- (instancetype)initWithFrame:(NSRect)frameRect withInternalPaddingAddedForContentView:(BOOL)internalPaddingAddedForContentView;
- (void)updateWithRepresentedItem:(nullable VLCLibraryRepresentedItem *)representedItem
fallbackTitle:(nullable NSString *)fallbackTitle
fallbackDetail:(nullable NSString *)fallbackDetail;

9
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.m

@ -68,6 +68,15 @@ const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 86.f;
return self;
}
- (instancetype)initWithFrame:(NSRect)frameRect withInternalPaddingAddedForContentView:(BOOL)internalPaddingAddedForContentView
{
self = [super initWithFrame:frameRect];
if (self) {
_internalPaddingAddedForContentView = internalPaddingAddedForContentView;
[self commonInit];
}
return self;
}
- (void)commonInit
{

2
modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m

@ -197,7 +197,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
0.f,
_audioGroupSelectionTableView.bounds.size.width,
headerHeight);
_audioCollectionHeaderView = [[VLCLibraryAudioGroupTableHeaderView alloc] initWithFrame:headerFrame];
_audioCollectionHeaderView = [[VLCLibraryAudioGroupTableHeaderView alloc] initWithFrame:headerFrame withInternalPaddingAddedForContentView:YES];
_audioCollectionHeaderView.autoresizingMask = NSViewWidthSizable;
_audioGroupSelectionTableView.headerView = self.audioCollectionHeaderView;

Loading…
Cancel
Save