[vlc-commits] macosx: add mojave specific sidebar icon set
Felix Paul Kühne
git at videolan.org
Wed Oct 31 20:40:33 CET 2018
vlc/vlc-3.0 | branch: master | Felix Paul Kühne <felix at feepk.net> | Wed Oct 31 20:39:48 2018 +0100| [ce5c9e7be53048261aa26f5fb7b58db0a02a8d46] | committer: Felix Paul Kühne
macosx: add mojave specific sidebar icon set
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=ce5c9e7be53048261aa26f5fb7b58db0a02a8d46
---
modules/gui/macosx/Makefile.am | 12 ++++++++++
.../dark/mv-dark-sidebar-local.pdf | Bin 0 -> 41127 bytes
.../dark/mv-dark-sidebar-movie.pdf | Bin 0 -> 35440 bytes
.../dark/mv-dark-sidebar-music.pdf | Bin 0 -> 318716 bytes
.../dark/mv-dark-sidebar-pictures.pdf | Bin 0 -> 44494 bytes
.../dark/mv-dark-sidebar-playlist.pdf | Bin 0 -> 23069 bytes
.../dark/mv-dark-sidebar-podcast.pdf | Bin 0 -> 27584 bytes
.../light/mv-sidebar-local.pdf | Bin 0 -> 32135 bytes
.../light/mv-sidebar-movie.pdf | Bin 0 -> 31800 bytes
.../light/mv-sidebar-music.pdf | Bin 0 -> 314686 bytes
.../light/mv-sidebar-pictures.pdf | Bin 0 -> 30956 bytes
.../light/mv-sidebar-playlist.pdf | Bin 0 -> 22002 bytes
.../light/mv-sidebar-podcast.pdf | Bin 0 -> 25661 bytes
modules/gui/macosx/VLCMainWindow.m | 25 ++++++++++++++-------
14 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index da4888f30e..3b7fd43286 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -674,6 +674,18 @@ libmacosx_plugin_la_RES = \
gui/macosx/Resources/sidebar-icons/sidebar-playlist at 2x.png \
gui/macosx/Resources/sidebar-icons/sidebar-podcast.png \
gui/macosx/Resources/sidebar-icons/sidebar-podcast at 2x.png \
+ gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-local.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-movie.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-music.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-pictures.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-playlist.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-podcast.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-local.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-movie.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-music.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-pictures.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-playlist.pdf \
+ gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-podcast.pdf \
gui/macosx/Resources/sidebar-icons_yosemite/ys-sidebar-local.png \
gui/macosx/Resources/sidebar-icons_yosemite/ys-sidebar-local at 2x.png \
gui/macosx/Resources/sidebar-icons_yosemite/ys-sidebar-movie.png \
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-local.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-local.pdf
new file mode 100644
index 0000000000..33f0b3b910
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-local.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-movie.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-movie.pdf
new file mode 100644
index 0000000000..e5345dde71
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-movie.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-music.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-music.pdf
new file mode 100644
index 0000000000..153ebd38fb
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-music.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-pictures.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-pictures.pdf
new file mode 100644
index 0000000000..e9ce188293
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-pictures.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-playlist.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-playlist.pdf
new file mode 100644
index 0000000000..c3e17e34c8
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-playlist.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-podcast.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-podcast.pdf
new file mode 100644
index 0000000000..79276a0702
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/dark/mv-dark-sidebar-podcast.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-local.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-local.pdf
new file mode 100644
index 0000000000..a18fd2e4ba
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-local.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-movie.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-movie.pdf
new file mode 100644
index 0000000000..72ac2452ea
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-movie.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-music.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-music.pdf
new file mode 100644
index 0000000000..d73d424f45
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-music.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-pictures.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-pictures.pdf
new file mode 100644
index 0000000000..37f889be8a
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-pictures.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-playlist.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-playlist.pdf
new file mode 100644
index 0000000000..ebd01af3f3
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-playlist.pdf differ
diff --git a/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-podcast.pdf b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-podcast.pdf
new file mode 100644
index 0000000000..9a778d2df4
Binary files /dev/null and b/modules/gui/macosx/Resources/sidebar-icons_mojave/light/mv-sidebar-podcast.pdf differ
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index 96ad1925a7..db37f7561c 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -305,12 +305,20 @@ static const float f_min_window_height = 307.;
if (o_sidebaritems)
isAReload = YES;
+ BOOL darkMode = NO;
+ if (@available(macOS 10.14, *)) {
+ NSApplication *app = [NSApplication sharedApplication];
+ if ([app.effectiveAppearance.name isEqualToString:NSAppearanceNameDarkAqua]) {
+ darkMode = YES;
+ }
+ }
+
o_sidebaritems = [[NSMutableArray alloc] init];
SideBarItem *libraryItem = [SideBarItem itemWithTitle:_NS("LIBRARY") identifier:@"library"];
SideBarItem *playlistItem = [SideBarItem itemWithTitle:_NS("Playlist") identifier:@"playlist"];
- [playlistItem setIcon: imageFromRes(@"sidebar-playlist")];
+ [playlistItem setIcon: sidebarImageFromRes(@"sidebar-playlist", darkMode)];
SideBarItem *medialibraryItem = [SideBarItem itemWithTitle:_NS("Media Library") identifier:@"medialibrary"];
- [medialibraryItem setIcon: imageFromRes(@"sidebar-playlist")];
+ [medialibraryItem setIcon: sidebarImageFromRes(@"sidebar-playlist", darkMode)];
SideBarItem *mycompItem = [SideBarItem itemWithTitle:_NS("MY COMPUTER") identifier:@"mycomputer"];
SideBarItem *devicesItem = [SideBarItem itemWithTitle:_NS("DEVICES") identifier:@"devices"];
SideBarItem *lanItem = [SideBarItem itemWithTitle:_NS("LOCAL NETWORK") identifier:@"localnetwork"];
@@ -334,27 +342,27 @@ static const float f_min_window_height = 307.;
switch (*p_category) {
case SD_CAT_INTERNET:
[internetItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
- [[internetItems lastObject] setIcon: imageFromRes(@"sidebar-podcast")];
+ [[internetItems lastObject] setIcon: sidebarImageFromRes(@"sidebar-podcast", darkMode)];
[[internetItems lastObject] setSdtype: SD_CAT_INTERNET];
break;
case SD_CAT_DEVICES:
[devicesItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
- [[devicesItems lastObject] setIcon: imageFromRes(@"sidebar-local")];
+ [[devicesItems lastObject] setIcon: sidebarImageFromRes(@"sidebar-local", darkMode)];
[[devicesItems lastObject] setSdtype: SD_CAT_DEVICES];
break;
case SD_CAT_LAN:
[lanItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
- [[lanItems lastObject] setIcon: imageFromRes(@"sidebar-local")];
+ [[lanItems lastObject] setIcon: sidebarImageFromRes(@"sidebar-local", darkMode)];
[[lanItems lastObject] setSdtype: SD_CAT_LAN];
break;
case SD_CAT_MYCOMPUTER:
[mycompItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
if (!strncmp(*ppsz_name, "video_dir", 9))
- [[mycompItems lastObject] setIcon: imageFromRes(@"sidebar-movie")];
+ [[mycompItems lastObject] setIcon: sidebarImageFromRes(@"sidebar-movie", darkMode)];
else if (!strncmp(*ppsz_name, "audio_dir", 9))
- [[mycompItems lastObject] setIcon: imageFromRes(@"sidebar-music")];
+ [[mycompItems lastObject] setIcon: sidebarImageFromRes(@"sidebar-music", darkMode)];
else if (!strncmp(*ppsz_name, "picture_dir", 11))
- [[mycompItems lastObject] setIcon: imageFromRes(@"sidebar-pictures")];
+ [[mycompItems lastObject] setIcon: sidebarImageFromRes(@"sidebar-pictures", darkMode)];
else
[[mycompItems lastObject] setIcon: [NSImage imageNamed:@"NSApplicationIcon"]];
[[mycompItems lastObject] setSdtype: SD_CAT_MYCOMPUTER];
@@ -757,6 +765,7 @@ static const float f_min_window_height = 307.;
} else {
[_dropzoneImageView setImage:imageFromRes(@"dropzone")];
}
+ [self reloadSidebar];
}
}
More information about the vlc-commits
mailing list