[vlc-commits] [Git][videolan/vlc][master] 4 commits: macosx: Add pin image view to main video view overlay view
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Jun 17 05:38:23 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
814be79d by Claudio Cambra at 2024-06-17T05:24:10+00:00
macosx: Add pin image view to main video view overlay view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
c8b7f228 by Claudio Cambra at 2024-06-17T05:24:10+00:00
macosx: Toggle visibility of pin indicator based on notifications
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
e5aa797c by Claudio Cambra at 2024-06-17T05:24:10+00:00
macosx: Ensure correct initialisation of float on top indicator in main video view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
8488b93b by Claudio Cambra at 2024-06-17T05:24:10+00:00
macosx: Update VLCMainVideoView xib values
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
3 changed files:
- modules/gui/macosx/UI/VLCMainVideoView.xib
- modules/gui/macosx/windows/video/VLCMainVideoViewController.h
- modules/gui/macosx/windows/video/VLCMainVideoViewController.m
Changes:
=====================================
modules/gui/macosx/UI/VLCMainVideoView.xib
=====================================
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment version="101000" identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22690"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -14,6 +14,7 @@
<outlet property="controlsBar" destination="3" id="Mfq-2w-2uR"/>
<outlet property="fakeTitleBar" destination="jnw-gL-nrF" id="7lZ-al-c3d"/>
<outlet property="fakeTitleBarHeightConstraint" destination="wY4-If-nIp" id="wPt-X4-mgu"/>
+ <outlet property="floatOnTopIndicatorImageView" destination="CrW-mq-gge" id="hqR-4Z-a18"/>
<outlet property="loadingIndicator" destination="xOQ-YR-iAc" id="CtX-Yo-UX2"/>
<outlet property="mainControlsView" destination="D4V-Zd-qvB" id="KwM-ya-ETn"/>
<outlet property="overlayView" destination="FGS-tq-54S" id="RSC-7m-N0y"/>
@@ -70,11 +71,26 @@
</visualEffectView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="FGS-tq-54S" customClass="VLCMainVideoViewOverlayView">
<rect key="frame" x="0.0" y="0.0" width="720" height="480"/>
+ <subviews>
+ <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CrW-mq-gge">
+ <rect key="frame" x="344" y="285.5" width="32.5" height="45"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="32" id="wyi-7y-I1n"/>
+ <constraint firstAttribute="height" constant="32" id="yeS-Wi-3sX"/>
+ </constraints>
+ <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" id="OcH-tO-P80">
+ <imageReference key="image" image="pin.fill" catalog="system" symbolScale="large"/>
+ </imageCell>
+ </imageView>
+ </subviews>
+ <constraints>
+ <constraint firstItem="CrW-mq-gge" firstAttribute="centerX" secondItem="FGS-tq-54S" secondAttribute="centerX" id="rPJ-ci-c4T"/>
+ </constraints>
</customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1GA-GG-Sdx">
<rect key="frame" x="0.0" y="0.0" width="720" height="132"/>
<subviews>
- <textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f4v-2z-dQ1" customClass="VLCTimeField">
+ <textField wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f4v-2z-dQ1" customClass="VLCTimeField">
<rect key="frame" x="623" y="20" width="79" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="8Zz-X6-yY1"/>
@@ -86,17 +102,17 @@
</textFieldCell>
</textField>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="San-L7-ZvB">
- <rect key="frame" x="20" y="59" width="390" height="53"/>
+ <rect key="frame" x="20" y="59" width="353" height="53"/>
<subviews>
- <textField wantsLayer="YES" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="lEW-MN-FFU" customClass="VLCWrappableTextField">
- <rect key="frame" x="-2" y="25" width="394" height="28"/>
+ <textField wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="lEW-MN-FFU" customClass="VLCWrappableTextField">
+ <rect key="frame" x="-2" y="25" width="357" height="28"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Nothing Playing" usesSingleLineMode="YES" id="8l0-zS-fOa">
<font key="font" metaFont="systemBold" size="24"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
- <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5ii-yU-6Zp" customClass="VLCWrappableTextField">
+ <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5ii-yU-6Zp" customClass="VLCWrappableTextField">
<rect key="frame" x="-2" y="0.0" width="145" height="21"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" placeholderString="No details to show" usesSingleLineMode="YES" id="k9I-DK-CEe">
<font key="font" textStyle="title2" name=".SFNS-Regular"/>
@@ -129,49 +145,51 @@
</connections>
</slider>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="10" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sJu-ZK-5QH">
- <rect key="frame" x="430" y="59" width="270" height="32"/>
+ <rect key="frame" x="393" y="59" width="307" height="32"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y8F-hr-iaW">
- <rect key="frame" x="0.0" y="0.0" width="143" height="32"/>
+ <rect key="frame" x="0.0" y="0.0" width="180" height="32"/>
<subviews>
<button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cja-ZG-8LF" customClass="VLCImageButton">
<rect key="frame" x="0.0" y="-1" width="32" height="33"/>
- <constraints>
- <constraint firstAttribute="width" secondItem="cja-ZG-8LF" secondAttribute="height" multiplier="1:1" id="Hc7-cx-AiL"/>
- <constraint firstAttribute="width" constant="32" id="NiS-Cd-FWu"/>
- </constraints>
<buttonCell key="cell" type="recessed" bezelStyle="recessed" image="waveform.circle" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="5em-Cm-yoF">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="cja-ZG-8LF" secondAttribute="height" multiplier="1:1" id="Hc7-cx-AiL"/>
+ <constraint firstAttribute="width" constant="32" id="NiS-Cd-FWu"/>
+ </constraints>
<connections>
<action selector="openAudioMenu:" target="3" id="hHT-Oc-wgF"/>
</connections>
</button>
<button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YTl-LZ-WDe" customClass="VLCImageButton">
<rect key="frame" x="37" y="-1" width="32" height="33"/>
- <constraints>
- <constraint firstAttribute="width" constant="32" id="lX6-ad-1gX"/>
- <constraint firstAttribute="width" secondItem="YTl-LZ-WDe" secondAttribute="height" multiplier="1:1" id="vzf-FG-VLf"/>
- </constraints>
<buttonCell key="cell" type="recessed" bezelStyle="recessed" image="text.bubble" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="1qF-LY-LkO">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="YTl-LZ-WDe" secondAttribute="height" multiplier="1:1" id="2QI-lH-hlk"/>
+ <constraint firstAttribute="width" constant="32" id="lX6-ad-1gX"/>
+ <constraint firstAttribute="width" secondItem="YTl-LZ-WDe" secondAttribute="height" multiplier="1:1" id="vzf-FG-VLf"/>
+ </constraints>
<connections>
<action selector="openSubtitlesMenu:" target="3" id="X6e-aG-mVF"/>
</connections>
</button>
<button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4tZ-52-1q9" customClass="VLCImageButton">
<rect key="frame" x="74" y="-1" width="32" height="33"/>
- <constraints>
- <constraint firstAttribute="width" constant="32" id="oY2-hp-RHB"/>
- <constraint firstAttribute="width" secondItem="4tZ-52-1q9" secondAttribute="height" multiplier="1:1" id="pSW-vN-Ly5"/>
- </constraints>
<buttonCell key="cell" type="recessed" bezelStyle="recessed" image="bookmark.circle" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="bGc-fn-jgQ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="4tZ-52-1q9" secondAttribute="height" multiplier="1:1" id="UdU-aK-B0s"/>
+ <constraint firstAttribute="width" constant="32" id="oY2-hp-RHB"/>
+ <constraint firstAttribute="width" secondItem="4tZ-52-1q9" secondAttribute="height" multiplier="1:1" id="pSW-vN-Ly5"/>
+ </constraints>
<connections>
<action selector="openBookmarks:" target="3" id="o6m-9M-L4U"/>
</connections>
@@ -205,10 +223,6 @@
</connections>
</button>
</subviews>
- <constraints>
- <constraint firstItem="YTl-LZ-WDe" firstAttribute="width" secondItem="YTl-LZ-WDe" secondAttribute="height" multiplier="1:1" id="2QI-lH-hlk"/>
- <constraint firstItem="4tZ-52-1q9" firstAttribute="width" secondItem="4tZ-52-1q9" secondAttribute="height" multiplier="1:1" id="UdU-aK-B0s"/>
- </constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
@@ -225,18 +239,18 @@
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zyp-45-IgR">
- <rect key="frame" x="153" y="0.0" width="117" height="32"/>
+ <rect key="frame" x="190" y="0.0" width="117" height="32"/>
<subviews>
<button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="afi-4d-rQk" customClass="VLCImageButton">
<rect key="frame" x="0.0" y="-1" width="32" height="33"/>
- <constraints>
- <constraint firstAttribute="width" secondItem="afi-4d-rQk" secondAttribute="height" multiplier="1:1" id="2lo-OW-sv9"/>
- <constraint firstAttribute="width" constant="32" id="PWI-LB-n9j"/>
- </constraints>
<buttonCell key="cell" type="recessed" bezelStyle="recessed" image="volume.3.fill" catalog="system" imagePosition="only" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="POe-ne-XtP">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="afi-4d-rQk" secondAttribute="height" multiplier="1:1" id="2lo-OW-sv9"/>
+ <constraint firstAttribute="width" constant="32" id="PWI-LB-n9j"/>
+ </constraints>
<connections>
<action selector="volumeAction:" target="3" id="GOu-6c-pg9"/>
</connections>
@@ -271,7 +285,7 @@
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
- <textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3ri-8b-8mw" customClass="VLCTimeField">
+ <textField wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3ri-8b-8mw" customClass="VLCTimeField">
<rect key="frame" x="18" y="20" width="79" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="S9v-aM-nfL"/>
@@ -308,10 +322,6 @@
<subviews>
<button translatesAutoresizingMaskIntoConstraints="NO" id="V9d-hX-iyg" customClass="VLCImageButton">
<rect key="frame" x="0.0" y="6.5" width="48" height="51"/>
- <constraints>
- <constraint firstAttribute="width" constant="48" id="XBm-GM-29d"/>
- <constraint firstAttribute="width" secondItem="V9d-hX-iyg" secondAttribute="height" multiplier="1:1" id="mjk-wN-72b"/>
- </constraints>
<shadow key="shadow" blurRadius="20">
<color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</shadow>
@@ -320,16 +330,16 @@
<font key="font" metaFont="system"/>
</buttonCell>
<color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267140000001" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="48" id="XBm-GM-29d"/>
+ <constraint firstAttribute="width" secondItem="V9d-hX-iyg" secondAttribute="height" multiplier="1:1" id="mjk-wN-72b"/>
+ </constraints>
<connections>
<action selector="bwd:" target="3" id="nDS-qm-Htv"/>
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="PCC-8a-sVF" customClass="VLCImageButton">
<rect key="frame" x="68" y="-2" width="64.5" height="68"/>
- <constraints>
- <constraint firstAttribute="width" secondItem="PCC-8a-sVF" secondAttribute="height" multiplier="1:1" id="2jF-Y0-kn3"/>
- <constraint firstAttribute="width" constant="64" id="OHb-xJ-sqM"/>
- </constraints>
<shadow key="shadow" blurRadius="30">
<color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</shadow>
@@ -338,6 +348,10 @@
<font key="font" metaFont="system"/>
</buttonCell>
<color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267136324741" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstAttribute="width" secondItem="PCC-8a-sVF" secondAttribute="height" multiplier="1:1" id="2jF-Y0-kn3"/>
+ <constraint firstAttribute="width" constant="64" id="OHb-xJ-sqM"/>
+ </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="toggle" value="YES"/>
</userDefinedRuntimeAttributes>
@@ -347,10 +361,6 @@
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="sF5-Z0-bef" customClass="VLCImageButton">
<rect key="frame" x="152" y="6.5" width="48" height="51"/>
- <constraints>
- <constraint firstAttribute="width" constant="48" id="M5n-CD-fd3"/>
- <constraint firstAttribute="width" secondItem="sF5-Z0-bef" secondAttribute="height" multiplier="1:1" id="b5c-td-Idb"/>
- </constraints>
<shadow key="shadow" blurRadius="20">
<color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</shadow>
@@ -359,6 +369,10 @@
<font key="font" metaFont="system"/>
</buttonCell>
<color key="contentTintColor" red="0.99999600649999998" green="1" blue="1" alpha="0.85338267140000001" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="48" id="M5n-CD-fd3"/>
+ <constraint firstAttribute="width" secondItem="sF5-Z0-bef" secondAttribute="height" multiplier="1:1" id="b5c-td-Idb"/>
+ </constraints>
<connections>
<action selector="fwd:" target="3" id="uPX-Xa-CwO"/>
</connections>
@@ -391,7 +405,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Drq-if-dw4">
- <rect key="frame" x="669" y="431" width="31" height="29"/>
+ <rect key="frame" x="670" y="431" width="30" height="29"/>
<shadow key="shadow" blurRadius="2">
<color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</shadow>
@@ -418,6 +432,7 @@
<constraint firstItem="jnw-gL-nrF" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" id="Z37-TJ-B2D"/>
<constraint firstAttribute="trailing" secondItem="1GA-GG-Sdx" secondAttribute="trailing" id="dWk-NI-ekN"/>
<constraint firstItem="CvV-yX-Nbh" firstAttribute="centerY" secondItem="1tI-8K-e3c" secondAttribute="centerY" id="l2Y-IR-aus"/>
+ <constraint firstItem="CrW-mq-gge" firstAttribute="bottom" secondItem="CvV-yX-Nbh" secondAttribute="top" constant="-20" id="mik-2t-Inh"/>
<constraint firstAttribute="bottom" secondItem="FGS-tq-54S" secondAttribute="bottom" id="ps4-nL-1Xc"/>
<constraint firstItem="FGS-tq-54S" firstAttribute="leading" secondItem="1tI-8K-e3c" secondAttribute="leading" id="qfd-OD-CHv"/>
<constraint firstAttribute="trailing" secondItem="Drq-if-dw4" secondAttribute="trailing" constant="20" id="rWa-NJ-Aju"/>
@@ -455,9 +470,10 @@
<image name="backward.fill" catalog="system" width="19" height="12"/>
<image name="bookmark.circle" catalog="system" width="15" height="15"/>
<image name="forward.fill" catalog="system" width="19" height="12"/>
+ <image name="pin.fill" catalog="system" width="19" height="22"/>
<image name="play.fill" catalog="system" width="12" height="13"/>
+ <image name="play.rectangle.on.rectangle.fill" catalog="system" width="19" height="16"/>
<image name="text.bubble" catalog="system" width="17" height="16"/>
- <image name="play.rectangle.on.rectangle.fill" catalog="system" width="20" height="16"/>
<image name="volume.3.fill" catalog="system" width="22" height="15"/>
<image name="waveform.circle" catalog="system" width="15" height="15"/>
</resources>
=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.h
=====================================
@@ -47,6 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, strong) IBOutlet NSVisualEffectView *fakeTitleBar;
@property (readwrite, strong) IBOutlet NSLayoutConstraint *fakeTitleBarHeightConstraint;
@property (readwrite, strong) IBOutlet NSProgressIndicator *loadingIndicator;
+ at property (readwrite, strong) IBOutlet NSImageView *floatOnTopIndicatorImageView;
@property (readonly, strong) VLCMainVideoViewAudioMediaDecorativeView *audioDecorativeView;
@property (readwrite, nonatomic) BOOL autohideControls;
=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -42,6 +42,7 @@
#import "windows/video/VLCMainVideoViewAudioMediaDecorativeView.h"
#import "windows/video/VLCMainVideoViewOverlayView.h"
+#import "windows/video/VLCVideoOutputProvider.h"
#import "windows/video/VLCVideoWindowCommon.h"
#import <vlc_common.h>
@@ -77,6 +78,14 @@
selector:@selector(playerBufferChanged:)
name:VLCPlayerBufferChanged
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(floatOnTopChanged:)
+ name:VLCWindowFloatOnTopChangedNotificationName
+ object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(shouldShowControls:)
+ name:VLCVideoWindowShouldShowFullscreenController
+ object:nil];
}
return self;
}
@@ -127,18 +136,22 @@
- (void)viewDidLoad
{
self.loadingIndicator.hidden = YES;
+
+ BOOL floatOnTopActive = NO;
+ VLCVideoWindowCommon * const window = (VLCVideoWindowCommon *)self.view.window;
+ vout_thread_t * const p_vout = window.videoViewController.voutView.voutThread;
+ if (p_vout) {
+ floatOnTopActive = var_GetBool(p_vout, "video-on-top");
+ vout_Release(p_vout);
+ }
+ self.floatOnTopIndicatorImageView.hidden = !floatOnTopActive;
+
_autohideControls = YES;
[self setDisplayLibraryControls:NO];
[self updatePlaylistToggleState];
[self updateLibraryControls];
- NSNotificationCenter *notificationCenter = NSNotificationCenter.defaultCenter;
- [notificationCenter addObserver:self
- selector:@selector(shouldShowControls:)
- name:VLCVideoWindowShouldShowFullscreenController
- object:nil];
-
_returnButtonBottomConstraint = [NSLayoutConstraint constraintWithItem:_returnButton
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
@@ -216,6 +229,17 @@
}
}
+- (void)floatOnTopChanged:(NSNotification *)notification
+{
+ VLCVideoWindowCommon * const videoWindow = (VLCVideoWindowCommon *)notification.object;
+ NSAssert(videoWindow != nil, @"Received video window should not be nil!");
+ NSDictionary<NSString *, NSNumber *> * const userInfo = notification.userInfo;
+ NSAssert(userInfo != nil, @"Received user info should not be nil!");
+ NSNumber * const enabledNumberWrapper = userInfo[VLCWindowFloatOnTopEnabledNotificationKey];
+ NSAssert(enabledNumberWrapper != nil, @"Received user info enabled wrapper should not be nil!");
+ self.floatOnTopIndicatorImageView.hidden = !enabledNumberWrapper.boolValue;
+}
+
- (BOOL)mouseOnControls
{
NSPoint mousePos = [self.view.window mouseLocationOutsideOfEventStream];
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c6566cf265d13fced726ca61644a301b543df559...8488b93bb1a44dc21e5242874c624547d4c69191
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c6566cf265d13fced726ca61644a301b543df559...8488b93bb1a44dc21e5242874c624547d4c69191
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