[vlc-commits] [Git][videolan/vlc][master] 17 commits: macosx: Make detached audio window control buttons more reasonably sized
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri May 17 05:23:44 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
546a036f by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Make detached audio window control buttons more reasonably sized
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
db26555f by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Use standard colour for time label in detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
10c5a666 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Use actual titlebar instead of custom close button in detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
6a333019 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Use default image corner cropping behaviour by default on detached audio window image view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
c43d7c42 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Constify pointers in detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
be00b9a8 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Apply Dark Aqua style on controls bar for detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
5a813d78 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Apply shadow effect to bottom control bar for detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
b78d3018 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Make wrapper view within detached audio window a main video overlay view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
05236fc0 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Make darkest gradient colour for main video view overlay view settable
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
ccb43e66 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Customise overlay view in detached audio window for better visibility of controls
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
3fe20ba3 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Add option to disable border on bottom bar view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
c16d21f6 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Disable border on bottom bar view of detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
261d385c by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Add ability to set enter/exit handling blocks to VLCTrackingView
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
5ac57531 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Make time label on detached audio window more readable
Bolden and add shadow
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
53e8fe6a by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Guard against nil handlers in tracking view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
e4fc7a6f by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Maintain strong reference to handler blocks in tracking view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
d97d5d71 by Claudio Cambra at 2024-05-17T04:50:56+00:00
macosx: Hide window buttons when mouse exits tracking view in detached audio window
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
9 changed files:
- modules/gui/macosx/UI/VLCDetachedAudioWindow.xib
- modules/gui/macosx/views/VLCBottomBarView.h
- modules/gui/macosx/views/VLCBottomBarView.m
- modules/gui/macosx/views/VLCTrackingView.h
- modules/gui/macosx/views/VLCTrackingView.m
- modules/gui/macosx/windows/VLCDetachedAudioWindow.h
- modules/gui/macosx/windows/VLCDetachedAudioWindow.m
- modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.h
- modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.m
Changes:
=====================================
modules/gui/macosx/UI/VLCDetachedAudioWindow.xib
=====================================
@@ -12,8 +12,8 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
- <window title="VLC media player" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="detachedaudiowindow" animationBehavior="default" titleVisibility="hidden" id="2" userLabel="Detached Audio Window" customClass="VLCDetachedAudioWindow">
- <windowStyleMask key="styleMask" resizable="YES" fullSizeContentView="YES"/>
+ <window title="VLC media player" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="detachedaudiowindow" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="2" userLabel="Detached Audio Window" customClass="VLCDetachedAudioWindow">
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/>
<rect key="contentRect" x="91" y="467" width="239" height="239"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
@@ -28,55 +28,53 @@
<constraint firstAttribute="width" secondItem="63" secondAttribute="height" multiplier="1:1" id="RxG-T1-BEQ"/>
</constraints>
</customView>
- <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="s7h-2z-AKB">
- <rect key="frame" x="0.0" y="0.0" width="239" height="233"/>
+ <customView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="s7h-2z-AKB" customClass="VLCMainVideoViewOverlayView">
+ <rect key="frame" x="0.0" y="0.0" width="239" height="239"/>
<subviews>
- <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="F6N-G1-ay4" customClass="VLCCustomWindowCloseButton">
- <rect key="frame" x="8" y="217" width="14" height="16"/>
- <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="window-close" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="WwK-DC-6gz" customClass="VLCWindowButtonCell">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <constraints>
- <constraint firstAttribute="height" constant="16" id="h5F-zc-xQI"/>
- <constraint firstAttribute="width" constant="14" id="u5l-1z-YIF"/>
- </constraints>
- </button>
- <customView translatesAutoresizingMaskIntoConstraints="NO" id="5" customClass="VLCBottomBarView">
- <rect key="frame" x="0.0" y="0.0" width="239" height="65"/>
+ <customView appearanceType="darkAqua" translatesAutoresizingMaskIntoConstraints="NO" id="5" customClass="VLCBottomBarView">
+ <rect key="frame" x="0.0" y="0.0" width="239" height="77"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="65" customClass="VLCDragDropView">
- <rect key="frame" x="0.0" y="0.0" width="239" height="65"/>
+ <rect key="frame" x="0.0" y="0.0" width="239" height="77"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Vae-cT-EEI" userLabel="Play controls group">
- <rect key="frame" x="77" y="10" width="85" height="23"/>
+ <rect key="frame" x="72" y="10" width="96" height="32"/>
<subviews>
<button translatesAutoresizingMaskIntoConstraints="NO" id="11">
- <rect key="frame" x="0.0" y="0.0" width="29" height="23"/>
- <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="backward-3btns" imagePosition="only" alignment="center" alternateImage="backward-3btns-pressed" continuous="YES" enabled="NO" imageScaling="proportionallyUpOrDown" id="14">
+ <rect key="frame" x="0.0" y="-1.5" width="32" height="35"/>
+ <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="backward.fill" catalog="system" imagePosition="only" alignment="center" alternateImage="backward.fill" controlSize="large" continuous="YES" enabled="NO" imageScaling="proportionallyUpOrDown" id="14">
<behavior key="behavior" lightByContents="YES"/>
- <font key="font" metaFont="label"/>
+ <font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="11" secondAttribute="height" multiplier="1:1" id="09v-B2-ddE"/>
+ </constraints>
<connections>
<action selector="bwd:" target="3" id="56"/>
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="10">
- <rect key="frame" x="29" y="0.0" width="27" height="23"/>
- <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="play" imagePosition="only" alignment="center" alternateImage="play-pressed" imageScaling="proportionallyUpOrDown" id="15">
+ <rect key="frame" x="32" y="-3" width="32" height="38"/>
+ <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="play.circle.fill" catalog="system" imagePosition="only" alignment="center" alternateImage="play.circle.fill" controlSize="large" imageScaling="proportionallyUpOrDown" id="15">
<behavior key="behavior" lightByContents="YES"/>
- <font key="font" metaFont="titleBar" size="12" textStyle="headline"/>
+ <font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="10" secondAttribute="height" multiplier="1:1" id="aTD-32-d4n"/>
+ </constraints>
<connections>
<action selector="play:" target="3" id="39"/>
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="12">
- <rect key="frame" x="56" y="0.0" width="29" height="23"/>
- <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="forward-3btns" imagePosition="only" alignment="center" alternateImage="forward-3btns-pressed" continuous="YES" enabled="NO" imageScaling="proportionallyUpOrDown" id="13">
+ <rect key="frame" x="64" y="-1.5" width="32" height="35"/>
+ <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="forward.fill" catalog="system" imagePosition="only" alignment="center" alternateImage="forward.fill" controlSize="large" continuous="YES" enabled="NO" imageScaling="proportionallyUpOrDown" id="13">
<behavior key="behavior" lightByContents="YES"/>
- <font key="font" metaFont="label"/>
+ <font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="12" secondAttribute="height" multiplier="1:1" id="Naf-xP-Ez9"/>
+ </constraints>
<connections>
<action selector="fwd:" target="3" id="51"/>
</connections>
@@ -87,7 +85,7 @@
<constraint firstItem="10" firstAttribute="left" secondItem="11" secondAttribute="right" id="496-Ip-nTd"/>
<constraint firstItem="10" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="9Kr-xx-Ssf"/>
<constraint firstAttribute="right" secondItem="12" secondAttribute="right" id="KOc-oW-4iH"/>
- <constraint firstAttribute="height" constant="23" id="bN7-k9-7Iy"/>
+ <constraint firstAttribute="height" constant="32" id="bN7-k9-7Iy"/>
<constraint firstAttribute="bottom" secondItem="11" secondAttribute="bottom" id="fFe-7J-ver"/>
<constraint firstItem="12" firstAttribute="top" secondItem="Vae-cT-EEI" secondAttribute="top" id="gwB-yN-SK0"/>
<constraint firstAttribute="bottom" secondItem="12" secondAttribute="bottom" id="l2h-EI-MAG"/>
@@ -97,7 +95,7 @@
</constraints>
</customView>
<slider hidden="YES" horizontalHuggingPriority="200" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="20" customClass="VLCSlider">
- <rect key="frame" x="8" y="41" width="176" height="18"/>
+ <rect key="frame" x="8" y="50" width="176" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="MYp-CS-yPe"/>
</constraints>
@@ -108,15 +106,18 @@
<action selector="timeSliderAction:" target="3" id="46"/>
</connections>
</slider>
- <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="VLCTimeField">
- <rect key="frame" x="185" y="44" width="46" height="13"/>
+ <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="VLCTimeField">
+ <rect key="frame" x="185" y="53" width="46" height="13"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="42" id="EvZ-Sy-m25"/>
<constraint firstAttribute="height" constant="13" id="LYT-Sd-Gf6"/>
</constraints>
+ <shadow key="shadow" blurRadius="1">
+ <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ </shadow>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" alignment="center" title="00:00" id="16">
- <font key="font" metaFont="label"/>
- <color key="textColor" white="0.25" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <font key="font" metaFont="systemBold" size="10"/>
+ <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
@@ -137,13 +138,14 @@
<constraint firstItem="65" firstAttribute="leading" secondItem="5" secondAttribute="leading" id="84j-is-ZZ4"/>
<constraint firstAttribute="bottom" secondItem="65" secondAttribute="bottom" id="WrS-PS-vpi"/>
<constraint firstItem="65" firstAttribute="top" secondItem="5" secondAttribute="top" id="ecn-UJ-dvK"/>
- <constraint firstAttribute="height" constant="65" id="z2X-5w-wme"/>
+ <constraint firstAttribute="height" constant="77" id="z2X-5w-wme"/>
</constraints>
+ <shadow key="shadow" blurRadius="10">
+ <color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ </shadow>
</customView>
</subviews>
<constraints>
- <constraint firstItem="F6N-G1-ay4" firstAttribute="top" secondItem="s7h-2z-AKB" secondAttribute="top" id="3fm-nY-Pva"/>
- <constraint firstItem="F6N-G1-ay4" firstAttribute="leading" secondItem="s7h-2z-AKB" secondAttribute="leading" constant="8" id="DxB-T0-68G"/>
<constraint firstAttribute="trailing" secondItem="5" secondAttribute="trailing" id="Vh6-w4-RpJ"/>
<constraint firstItem="5" firstAttribute="leading" secondItem="s7h-2z-AKB" secondAttribute="leading" id="aOM-Yt-uR4"/>
<constraint firstAttribute="bottom" secondItem="5" secondAttribute="bottom" id="sVp-W4-nlt"/>
@@ -167,14 +169,14 @@
<constraint firstAttribute="trailing" secondItem="63" secondAttribute="trailing" id="b8X-Kc-BfD"/>
<constraint firstAttribute="bottom" secondItem="s7h-2z-AKB" secondAttribute="bottom" id="d58-lr-6o8"/>
<constraint firstAttribute="trailing" secondItem="s7h-2z-AKB" secondAttribute="trailing" id="dB2-xi-SzA"/>
- <constraint firstItem="s7h-2z-AKB" firstAttribute="top" secondItem="4" secondAttribute="top" constant="6" id="plq-T3-bmm"/>
+ <constraint firstItem="s7h-2z-AKB" firstAttribute="top" secondItem="4" secondAttribute="top" id="plq-T3-bmm"/>
</constraints>
</view>
<connections>
<outlet property="bottomBarView" destination="5" id="xZs-ha-Bmg"/>
<outlet property="controlsBar" destination="3" id="69"/>
<outlet property="imageView" destination="63" id="xYd-xT-wUa"/>
- <outlet property="wrapperView" destination="s7h-2z-AKB" id="Vze-9X-Oxo"/>
+ <outlet property="overlayView" destination="s7h-2z-AKB" id="VGk-aw-I4j"/>
</connections>
<point key="canvasLocation" x="138.5" y="146.5"/>
</window>
@@ -190,12 +192,8 @@
</customObject>
</objects>
<resources>
- <image name="backward-3btns" width="29" height="23"/>
- <image name="backward-3btns-pressed" width="29" height="23"/>
- <image name="forward-3btns" width="29" height="23"/>
- <image name="forward-3btns-pressed" width="29" height="23"/>
- <image name="play" width="27" height="23"/>
- <image name="play-pressed" width="27" height="23"/>
- <image name="window-close" width="14" height="16"/>
+ <image name="backward.fill" catalog="system" width="19" height="12"/>
+ <image name="forward.fill" catalog="system" width="19" height="12"/>
+ <image name="play.circle.fill" catalog="system" width="15" height="15"/>
</resources>
</document>
=====================================
modules/gui/macosx/views/VLCBottomBarView.h
=====================================
@@ -24,4 +24,6 @@
@interface VLCBottomBarView : NSView
+ at property (readwrite, assign) BOOL drawBorder;
+
@end
=====================================
modules/gui/macosx/views/VLCBottomBarView.m
=====================================
@@ -66,12 +66,17 @@
{
self.wantsLayer = YES;
self.needsDisplay = YES;
+ self.drawBorder = YES;
}
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
+ if (!self.drawBorder) {
+ return;
+ }
+
const NSRect barFrame = self.frame;
NSBezierPath * const separatorPath = NSBezierPath.bezierPath;
[separatorPath moveToPoint:NSMakePoint(NSMinX(barFrame), NSMaxY(barFrame) - 0.5)];
=====================================
modules/gui/macosx/views/VLCTrackingView.h
=====================================
@@ -24,11 +24,15 @@
NS_ASSUME_NONNULL_BEGIN
+typedef void(^EnterExitBlock)(void);
+
@interface VLCTrackingView : NSView
@property (readwrite) BOOL animatesTransition;
@property (readwrite, assign, nullable) NSView *viewToHide; // Hide when mouse out
@property (readwrite, assign, nullable) NSView *viewToShow; // Show when mouse out
+ at property (readwrite, strong, nullable) EnterExitBlock mouseEnteredBlock;
+ at property (readwrite, strong, nullable) EnterExitBlock mouseExitedBlock;
@end
=====================================
modules/gui/macosx/views/VLCTrackingView.m
=====================================
@@ -65,12 +65,18 @@
{
_mouseIn = YES;
[self performTransition];
+ if (self.mouseEnteredBlock) {
+ self.mouseEnteredBlock();
+ }
}
- (void)handleMouseExit
{
_mouseIn = NO;
[self performTransition];
+ if (self.mouseExitedBlock) {
+ self.mouseExitedBlock();
+ }
}
- (void)mouseEntered:(NSEvent *)event
=====================================
modules/gui/macosx/windows/VLCDetachedAudioWindow.h
=====================================
@@ -26,12 +26,13 @@
@class VLCControlsBarCommon;
@class VLCImageView;
@class VLCBottomBarView;
+ at class VLCMainVideoViewOverlayView;
NS_ASSUME_NONNULL_BEGIN
@interface VLCDetachedAudioWindow : VLCWindow
- at property (nonatomic, weak) IBOutlet NSView *wrapperView;
+ at property (nonatomic, weak) IBOutlet VLCMainVideoViewOverlayView *overlayView;
@property (nonatomic, weak) IBOutlet VLCImageView *imageView;
@property (nonatomic, weak) IBOutlet VLCControlsBarCommon *controlsBar;
@property (nonatomic, weak) IBOutlet VLCBottomBarView *bottomBarView;
=====================================
modules/gui/macosx/windows/VLCDetachedAudioWindow.m
=====================================
@@ -38,6 +38,8 @@
#import "windows/controlsbar/VLCControlsBarCommon.h"
+#import "windows/video/VLCMainVideoViewOverlayView.h"
+
@interface VLCDetachedAudioWindow()
{
VLCPlayerController *_playerController;
@@ -49,15 +51,29 @@
- (void)awakeFromNib
{
self.title = @"";
- self.imageView.cropsImagesToRoundedCorners = NO;
_playerController = VLCMain.sharedInstance.playlistController.playerController;
- VLCTrackingView *trackingView = self.contentView;
- trackingView.viewToHide = self.wrapperView;
+
+ VLCTrackingView * const trackingView = self.contentView;
+ trackingView.viewToHide = self.overlayView;
trackingView.animatesTransition = YES;
+ trackingView.mouseEnteredBlock = ^{
+ self.styleMask |= NSWindowStyleMaskTitled;
+ };
+ trackingView.mouseExitedBlock = ^{
+ self.styleMask &= ~NSWindowStyleMaskTitled;
+ };
+
+ self.overlayView.drawGradientForTopControls = YES;
+ self.overlayView.darkestGradientColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.8];
+
+ self.bottomBarView.drawBorder = NO;
- NSNotificationCenter *notificationCenter = NSNotificationCenter.defaultCenter;
- [notificationCenter addObserver:self selector:@selector(inputItemChanged:) name:VLCPlayerCurrentMediaItemChanged object:nil];
+ NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
+ [notificationCenter addObserver:self
+ selector:@selector(inputItemChanged:)
+ name:VLCPlayerCurrentMediaItemChanged
+ object:nil];
[self inputItemChanged:nil];
}
@@ -69,7 +85,7 @@
- (void)inputItemChanged:(NSNotification *)aNotification
{
- VLCInputItem *currentInput = _playerController.currentMedia;
+ VLCInputItem * const currentInput = _playerController.currentMedia;
if (currentInput) {
[self.imageView setImageURL:currentInput.artworkURL placeholderImage:[NSImage imageNamed:@"noart.png"]];
} else {
=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.h
=====================================
@@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface VLCMainVideoViewOverlayView : NSView
@property (readwrite, assign) BOOL drawGradientForTopControls;
+ at property (readwrite, strong) NSColor *darkestGradientColor;
@end
=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewOverlayView.m
=====================================
@@ -22,24 +22,28 @@
#import "VLCMainVideoViewOverlayView.h"
+
@implementation VLCMainVideoViewOverlayView
-- (void)drawRect:(NSRect)dirtyRect {
- [super drawRect:dirtyRect];
+- (void)awakeFromNib
+{
+ self.darkestGradientColor = [NSColor colorWithCalibratedWhite:0 alpha:0.4];
+}
- // Drawing code here.
- NSColor *_darkestGradientColor = [NSColor colorWithWhite:0 alpha:0.4];
+- (void)drawRect:(NSRect)dirtyRect
+{
+ [super drawRect:dirtyRect];
NSGradient *gradient;
- if (_drawGradientForTopControls) {
- gradient = [[NSGradient alloc] initWithColorsAndLocations:_darkestGradientColor, 0.,
- [NSColor clearColor], 0.5,
- _darkestGradientColor, 1.,
+ if (self.drawGradientForTopControls) {
+ gradient = [[NSGradient alloc] initWithColorsAndLocations:self.darkestGradientColor, 0.,
+ NSColor.clearColor, 0.5,
+ self.darkestGradientColor, 1.,
nil];
} else {
- gradient = [[NSGradient alloc] initWithColorsAndLocations:_darkestGradientColor, 0,
- [NSColor clearColor], 1.,
+ gradient = [[NSGradient alloc] initWithColorsAndLocations:self.darkestGradientColor, 0.,
+ NSColor.clearColor, 1.,
nil];
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1fb04ec98ba0a813cf984cf077c3c27cb6297191...d97d5d713bd5fcc0c83643cc2aded8145ce4aa73
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1fb04ec98ba0a813cf984cf077c3c27cb6297191...d97d5d713bd5fcc0c83643cc2aded8145ce4aa73
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list