[vlc-commits] macosx: add custom window close button

2019-11-03 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne  | Fri Nov  1 09:16:17 
2019 +0100| [72e49c8ea3e55bcbfb40c3a36b598b0352760bde] | committer: Felix Paul 
Kühne

macosx: add custom window close button

This is based on legacy code of the 3.0 branch

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72e49c8ea3e55bcbfb40c3a36b598b0352760bde
---

 .../package/macosx/VLC.xcodeproj/project.pbxproj   |   6 +
 modules/gui/macosx/Makefile.am |  16 +-
 .../Button-Icons/window-close-graphite.png | Bin 0 -> 228 bytes
 .../Button-Icons/window-close-graph...@2x.png  | Bin 0 -> 381 bytes
 .../Button-Icons/window-close-on-graphite.png  | Bin 0 -> 278 bytes
 .../Button-Icons/window-close-on-graph...@2x.png   | Bin 0 -> 441 bytes
 .../Resources/Button-Icons/window-close-on.png | Bin 0 -> 286 bytes
 .../Resources/Button-Icons/window-close...@2x.png  | Bin 0 -> 477 bytes
 .../Button-Icons/window-close-over-graphite.png| Bin 0 -> 253 bytes
 .../Button-Icons/window-close-over-graph...@2x.png | Bin 0 -> 437 bytes
 .../Resources/Button-Icons/window-close-over.png   | Bin 0 -> 293 bytes
 .../Button-Icons/window-close-o...@2x.png  | Bin 0 -> 449 bytes
 .../macosx/Resources/Button-Icons/window-close.png | Bin 0 -> 248 bytes
 .../Resources/Button-Icons/window-cl...@2x.png | Bin 0 -> 379 bytes
 modules/gui/macosx/views/VLCCustomWindowButton.h   |  56 +
 modules/gui/macosx/views/VLCCustomWindowButton.m   | 262 +
 po/POTFILES.in |   2 +
 17 files changed, 341 insertions(+), 1 deletion(-)

diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj 
b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index 84bb08d28e..c6a4fde941 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -120,6 +120,7 @@
7D445D8B22032B9200263D34 /* VLCPlaylistTableView.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 7D445D8A22032B9200263D34 /* 
VLCPlaylistTableView.m */; };
7D445D8E2203375100263D34 /* VLCPlaylistMenuController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 7D445D8D2203375100263D34 /* 
VLCPlaylistMenuController.m */; };
7D460B0C229EB4C700097948 /* VLCDragDropView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 7D460B0B229EB4C700097948 /* VLCDragDropView.m 
*/; };
+   7D61DCE4236C1937008133CF /* VLCCustomWindowButton.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 7D61DCE3236C1937008133CF /* 
VLCCustomWindowButton.m */; };
7D66D4362200BC340040D04A /* VLCClickerManager.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 7D66D4352200BC340040D04A /* VLCClickerManager.m 
*/; };
7D66D4392200C5B80040D04A /* VLCVideoFilterHelper.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 7D66D4382200C5B80040D04A /* 
VLCVideoFilterHelper.m */; };
7D66D43C2200D6090040D04A /* VLCDetachedVideoWindow.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 7D66D43B2200D6090040D04A /* 
VLCDetachedVideoWindow.m */; };
@@ -497,6 +498,8 @@
7D5678EC1D5BA1DC002698F3 /* VLCApplication.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= VLCApplication.m; sourceTree = ""; };
7D5678EE1D5BA397002698F3 /* VLCMainWindowControlsBar.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = VLCMainWindowControlsBar.h; sourceTree = ""; };
7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = VLCMainWindowControlsBar.m; sourceTree = ""; };
+   7D61DCE2236C1937008133CF /* VLCCustomWindowButton.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCCustomWindowButton.h; sourceTree = ""; };
+   7D61DCE3236C1937008133CF /* VLCCustomWindowButton.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCCustomWindowButton.m; sourceTree = ""; };
7D66D4342200BC340040D04A /* VLCClickerManager.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCClickerManager.h; sourceTree = ""; };
7D66D4352200BC340040D04A /* VLCClickerManager.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCClickerManager.m; sourceTree = ""; };
7D66D4372200C5B80040D04A /* VLCVideoFilterHelper.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCVideoFilterHelper.h; sourceTree = ""; };
@@ -825,6 +828,8 @@
1C1ED5062204AB7C00811EC0 /* views */ = {
isa = PBXGroup;
children = (
+   7D61DCE2236C1937008133CF /* 
VLCCustomWindowButton.h */,
+   7D61DCE3236C1937008133CF /* 

[vlc-commits] macosx/image view: add API to disable rounded corner masking

2019-11-03 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne  | Sun Nov  3 18:44:36 
2019 +0100| [bcef1373d83e76e094aa4474a24b918cf1c08fa9] | committer: Felix Paul 
Kühne

macosx/image view: add API to disable rounded corner masking

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcef1373d83e76e094aa4474a24b918cf1c08fa9
---

 modules/gui/macosx/views/VLCImageView.h |  1 +
 modules/gui/macosx/views/VLCImageView.m | 22 +++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/views/VLCImageView.h 
b/modules/gui/macosx/views/VLCImageView.h
index 4008d299da..9bb3094f04 100644
--- a/modules/gui/macosx/views/VLCImageView.h
+++ b/modules/gui/macosx/views/VLCImageView.h
@@ -41,6 +41,7 @@ typedef NS_ENUM(NSInteger, VLCImageViewContentGravity) {
 
 @property (readwrite, retain, nonatomic, nullable) NSImage *image;
 @property (readwrite) VLCImageViewContentGravity contentGravity;
+@property (readwrite) BOOL cropsImagesToRoundedCorners;
 
 - (void)setImageURL:(NSURL * _Nonnull)url placeholderImage:(NSImage * 
_Nullable)image;
 
diff --git a/modules/gui/macosx/views/VLCImageView.m 
b/modules/gui/macosx/views/VLCImageView.m
index bd4184cbfd..53294a0c2e 100644
--- a/modules/gui/macosx/views/VLCImageView.m
+++ b/modules/gui/macosx/views/VLCImageView.m
@@ -49,12 +49,28 @@
 self.layer = [[CALayer alloc] init];
 self.contentGravity = VLCImageViewContentGravityResizeAspectFill;
 self.wantsLayer = YES;
-self.layer.cornerRadius = 5.;
-self.layer.masksToBounds = YES;
-self.layer.borderWidth = 1.;
+[self setCropsImagesToRoundedCorners:YES];
 [self setupBorderColor];
 }
 
+- (void)setCropsImagesToRoundedCorners:(BOOL)cropsImagesToRoundedCorners
+{
+if (cropsImagesToRoundedCorners) {
+self.layer.cornerRadius = 5.;
+self.layer.masksToBounds = YES;
+self.layer.borderWidth = 1.;
+} else {
+self.layer.cornerRadius = 0.;
+self.layer.masksToBounds = NO;
+self.layer.borderWidth = 0.;
+}
+}
+
+- (BOOL)cropsImagesToRoundedCorners
+{
+return self.layer.masksToBounds;
+}
+
 - (void)setupBorderColor
 {
 self.layer.borderColor = self.shouldShowDarkAppearance ? [NSColor 
VLClibrarySeparatorDarkColor].CGColor : [NSColor 
VLClibrarySeparatorLightColor].CGColor;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] macosx/detached audio window: add close button and animations

2019-11-03 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne  | Sun Nov  3 19:13:43 
2019 +0100| [62c62bac312e3c1606325f683a90b1589e7ead8b] | committer: Felix Paul 
Kühne

macosx/detached audio window: add close button and animations

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62c62bac312e3c1606325f683a90b1589e7ead8b
---

 .../package/macosx/VLC.xcodeproj/project.pbxproj   |  32 
 modules/gui/macosx/UI/VLCDetachedAudioWindow.xib   | 198 -
 .../gui/macosx/windows/VLCDetachedAudioWindow.h|   1 +
 .../gui/macosx/windows/VLCDetachedAudioWindow.m|  15 +-
 4 files changed, 157 insertions(+), 89 deletions(-)

diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj 
b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index c6a4fde941..76c85cb66d 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -500,6 +500,18 @@
7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = VLCMainWindowControlsBar.m; sourceTree = ""; };
7D61DCE2236C1937008133CF /* VLCCustomWindowButton.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCCustomWindowButton.h; sourceTree = ""; };
7D61DCE3236C1937008133CF /* VLCCustomWindowButton.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCCustomWindowButton.m; sourceTree = ""; };
+   7D61DCE7236C6A3D008133CF /* window-close.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; name = "window-close.png"; 
path = "Button-Icons/window-close.png"; sourceTree = ""; };
+   7D61DCE8236C6A3D008133CF /* window-close-on-graph...@2x.png */ 
= {isa = PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-on-graph...@2x.png"; path = 
"Button-Icons/window-close-on-graph...@2x.png"; sourceTree = ""; };
+   7D61DCE9236C6A3D008133CF /* window-close-over-graphite.png */ = 
{isa = PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-over-graphite.png"; path = 
"Button-Icons/window-close-over-graphite.png"; sourceTree = ""; };
+   7D61DCEA236C6A3D008133CF /* window-close-o...@2x.png */ = {isa 
= PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-o...@2x.png"; path = "Button-Icons/window-close-o...@2x.png"; 
sourceTree = ""; };
+   7D61DCEB236C6A3D008133CF /* window-close-on-graphite.png */ = 
{isa = PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-on-graphite.png"; path = 
"Button-Icons/window-close-on-graphite.png"; sourceTree = ""; };
+   7D61DCEC236C6A3D008133CF /* window-close...@2x.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; name = 
"window-close...@2x.png"; path = "Button-Icons/window-close...@2x.png"; 
sourceTree = ""; };
+   7D61DCED236C6A3D008133CF /* window-close-graph...@2x.png */ = 
{isa = PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-graph...@2x.png"; path = 
"Button-Icons/window-close-graph...@2x.png"; sourceTree = ""; };
+   7D61DCEE236C6A3D008133CF /* window-close-on.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; name = "window-close-on.png"; 
path = "Button-Icons/window-close-on.png"; sourceTree = ""; };
+   7D61DCEF236C6A3D008133CF /* window-close-over-graph...@2x.png 
*/ = {isa = PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-over-graph...@2x.png"; path = 
"Button-Icons/window-close-over-graph...@2x.png"; sourceTree = ""; };
+   7D61DCF0236C6A3D008133CF /* window-close-over.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-over.png"; path = "Button-Icons/window-close-over.png"; 
sourceTree = ""; };
+   7D61DCF1236C6A3D008133CF /* window-cl...@2x.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; name = "window-cl...@2x.png"; 
path = "Button-Icons/window-cl...@2x.png"; sourceTree = ""; };
+   7D61DCF2236C6A3D008133CF /* window-close-graphite.png */ = {isa 
= PBXFileReference; lastKnownFileType = image.png; name = 
"window-close-graphite.png"; path = "Button-Icons/window-close-graphite.png"; 
sourceTree = ""; };
7D66D4342200BC340040D04A /* VLCClickerManager.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCClickerManager.h; sourceTree = ""; };
7D66D4352200BC340040D04A /* VLCClickerManager.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCClickerManager.m; sourceTree = ""; };
7D66D4372200C5B80040D04A /* VLCVideoFilterHelper.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCVideoFilterHelper.h; sourceTree = ""; };
@@ -1378,6 +1390,25 @@
name = "Library Window";
   

[vlc-commits] macosx/tracking view: add API to animate transitions

2019-11-03 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne  | Sun Nov  3 19:12:50 
2019 +0100| [096145ee1df4fc5ce40ba95daf73efc683678cab] | committer: Felix Paul 
Kühne

macosx/tracking view: add API to animate transitions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=096145ee1df4fc5ce40ba95daf73efc683678cab
---

 modules/gui/macosx/views/VLCTrackingView.h |  1 +
 modules/gui/macosx/views/VLCTrackingView.m | 25 +++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/views/VLCTrackingView.h 
b/modules/gui/macosx/views/VLCTrackingView.h
index 2c4a6976ed..c115a7f17c 100644
--- a/modules/gui/macosx/views/VLCTrackingView.h
+++ b/modules/gui/macosx/views/VLCTrackingView.h
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface VLCTrackingView : NSView
 
+@property (readwrite) BOOL animatesTransition;
 @property (readwrite, assign, nullable) NSView *viewToHide;
 
 @end
diff --git a/modules/gui/macosx/views/VLCTrackingView.m 
b/modules/gui/macosx/views/VLCTrackingView.m
index 01fb4cf7f1..bc07fa830b 100644
--- a/modules/gui/macosx/views/VLCTrackingView.m
+++ b/modules/gui/macosx/views/VLCTrackingView.m
@@ -32,12 +32,33 @@
 
 - (void)mouseExited:(NSEvent *)event
 {
-self.viewToHide.hidden = YES;
+if (self.animatesTransition) {
+[self.viewToHide setAlphaValue:1.0];
+__weak typeof(self.viewToHide) weakViewToHide = self.viewToHide;
+[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
+[[NSAnimationContext currentContext] setDuration:0.9];
+[[weakViewToHide animator] setAlphaValue:0.0];
+} completionHandler:^{
+[weakViewToHide setHidden:YES];
+}];
+} else {
+self.viewToHide.hidden = YES;
+}
 }
 
 - (void)mouseEntered:(NSEvent *)event
 {
-self.viewToHide.hidden = NO;
+if (self.animatesTransition) {
+[self.viewToHide setAlphaValue:.0];
+[self.viewToHide setHidden:NO];
+__weak typeof(self.viewToHide) weakViewToHide = self.viewToHide;
+[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
+[[NSAnimationContext currentContext] setDuration:0.9];
+[[weakViewToHide animator] setAlphaValue:1.0];
+} completionHandler:nil];
+} else {
+self.viewToHide.hidden = NO;
+}
 }
 
 - (void)updateTrackingAreas

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] archive: Add support for RAR 5.0 format

2019-11-03 Thread Johan Gunnarsson
vlc | branch: master | Johan Gunnarsson  | Sun Nov  
3 00:23:00 2019 +0100| [059f6f5690005853f3e3160f5f896301b2f52ecd] | committer: 
Jean-Baptiste Kempf

archive: Add support for RAR 5.0 format

libarchive 3.4.0 adds support for RAR 5.0. See
https://www.rarlab.com/technote.htm#rarsign for description of signatures.

Signed-off-by: Jean-Baptiste Kempf 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=059f6f5690005853f3e3160f5f896301b2f52ecd
---

 modules/stream_extractor/archive.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c 
b/modules/stream_extractor/archive.c
index 3498bd2fb9..f9493bbbd6 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -453,7 +453,10 @@ static int probe( stream_t* source )
 } const magicbytes[] = {
 /* keep heaviest at top */
 { 257, 5, "ustar" },  //TAR
-{ 0,   7, "Rar!\x1A\x07" },   //RAR
+#if ARCHIVE_VERSION_NUMBER >= 3004000
+{ 0,   8, "Rar!\x1A\x07\x01" },   //RAR5.0
+#endif
+{ 0,   7, "Rar!\x1A\x07" },   //RAR4.x
 { 0,   6, "7z\xBC\xAF\x27\x1C" }, //7z
 { 0,   4, "xar!" },   //XAR
 { 0,   4, "PK\x03\x04" }, //ZIP

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Contrib: update libarchive to 5.0

2019-11-03 Thread Jean-Baptiste Kempf
vlc | branch: master | Jean-Baptiste Kempf  | Sun Nov  3 
11:30:57 2019 +0100| [7610e6888bd21ec6cba926671bc59a252c394a1c] | committer: 
Jean-Baptiste Kempf

Contrib: update libarchive to 5.0

Support for RARv5 and ZIPX are in :)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7610e6888bd21ec6cba926671bc59a252c394a1c
---

 contrib/src/libarchive/SHA512SUMS | 2 +-
 contrib/src/libarchive/rules.mak  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/src/libarchive/SHA512SUMS 
b/contrib/src/libarchive/SHA512SUMS
index 40fa0ea4aa..1d2549912f 100644
--- a/contrib/src/libarchive/SHA512SUMS
+++ b/contrib/src/libarchive/SHA512SUMS
@@ -1 +1 @@
-1e538cd7d492f54b11c16c56f12c1632ba14302a3737ec0db786272aec0c8020f1e27616a7654d57e26737e5ed9bfc9a62f1fdda61a95c39eb726aa7c2f673e4
  libarchive-3.3.2.tar.gz
+2f9e2a551a6bcab56fb1a030b5d656df7299a3d151465aa02f0420d344d2fada49dee4755b3abff9095f62519e14dc9af8afa1695ecc6d5fdb4f0b28e6ede852
  libarchive-3.4.0.tar.gz
diff --git a/contrib/src/libarchive/rules.mak b/contrib/src/libarchive/rules.mak
index 3721a0e932..9781a3ce80 100644
--- a/contrib/src/libarchive/rules.mak
+++ b/contrib/src/libarchive/rules.mak
@@ -1,5 +1,5 @@
 # LIBARCHIVE
-LIBARCHIVE_VERSION := 3.3.2
+LIBARCHIVE_VERSION := 3.4.0
 LIBARCHIVE_URL := 
http://www.libarchive.org/downloads/libarchive-$(LIBARCHIVE_VERSION).tar.gz
 
 PKGS += libarchive

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits