Commit 3b59b6f6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: implemented graphics for next/previous in the 6 button state

parent 75c9a925
......@@ -234,6 +234,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/mini-progressbar-wrapper-left.png \
extras/package/macosx/Resources/mainwindow/mini-progressbar-wrapper-middle.png \
extras/package/macosx/Resources/mainwindow/mini-progressbar-wrapper-right.png \
extras/package/macosx/Resources/mainwindow/next-6btns-pressed.png \
extras/package/macosx/Resources/mainwindow/next-6btns-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/next-6btns.png \
extras/package/macosx/Resources/mainwindow/next-6btns@2x.png \
extras/package/macosx/Resources/mainwindow/pause-pressed.png \
extras/package/macosx/Resources/mainwindow/pause-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/pause.png \
......@@ -252,6 +256,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/playlist-btn-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/playlist-btn.png \
extras/package/macosx/Resources/mainwindow/playlist-btn@2x.png \
extras/package/macosx/Resources/mainwindow/previous-6btns-pressed.png \
extras/package/macosx/Resources/mainwindow/previous-6btns-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/previous-6btns.png \
extras/package/macosx/Resources/mainwindow/previous-6btns@2x.png \
extras/package/macosx/Resources/mainwindow/progression-fill-left.png \
extras/package/macosx/Resources/mainwindow/progression-fill-left@2x.png \
extras/package/macosx/Resources/mainwindow/progression-fill-middle.png \
......@@ -332,6 +340,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/fullscreen-one-button-pressed_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/fullscreen-one-button_dark.png \
extras/package/macosx/Resources/mainwindow_dark/fullscreen-one-button_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/next-6btns-dark-pressed.png \
extras/package/macosx/Resources/mainwindow_dark/next-6btns-dark-pressed@2x.png \
extras/package/macosx/Resources/mainwindow_dark/next-6btns-dark.png \
extras/package/macosx/Resources/mainwindow_dark/next-6btns-dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/pause-pressed_dark.png \
extras/package/macosx/Resources/mainwindow_dark/pause-pressed_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/pause_dark.png \
......@@ -352,6 +364,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/playlist-pressed_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/playlist_dark.png \
extras/package/macosx/Resources/mainwindow_dark/playlist_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/previous-6btns-dark-pressed.png \
extras/package/macosx/Resources/mainwindow_dark/previous-6btns-dark-pressed@2x.png \
extras/package/macosx/Resources/mainwindow_dark/previous-6btns-dark.png \
extras/package/macosx/Resources/mainwindow_dark/previous-6btns-dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/progressbar-fill-left_dark.png \
extras/package/macosx/Resources/mainwindow_dark/progressbar-fill-left_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/progressbar-fill-middle_dark.png \
......
......@@ -163,6 +163,22 @@
CC166FBB15F511DB0088201B /* backward-3btns-pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FB715F511DB0088201B /* backward-3btns-pressed@2x.png */; };
CC166FBC15F511DB0088201B /* backward-3btns.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FB815F511DB0088201B /* backward-3btns.png */; };
CC166FBD15F511DB0088201B /* backward-3btns@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FB915F511DB0088201B /* backward-3btns@2x.png */; };
CC166FC815F5134A0088201B /* next-6btns-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FC415F5134A0088201B /* next-6btns-pressed.png */; };
CC166FC915F5134A0088201B /* next-6btns-pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FC515F5134A0088201B /* next-6btns-pressed@2x.png */; };
CC166FCA15F5134A0088201B /* next-6btns.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FC615F5134A0088201B /* next-6btns.png */; };
CC166FCB15F5134A0088201B /* next-6btns@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FC715F5134A0088201B /* next-6btns@2x.png */; };
CC166FD115F513560088201B /* previous-6btns-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FCD15F513560088201B /* previous-6btns-pressed.png */; };
CC166FD215F513560088201B /* previous-6btns-pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FCE15F513560088201B /* previous-6btns-pressed@2x.png */; };
CC166FD315F513560088201B /* previous-6btns.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FCF15F513560088201B /* previous-6btns.png */; };
CC166FD415F513560088201B /* previous-6btns@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FD015F513560088201B /* previous-6btns@2x.png */; };
CC166FD915F513640088201B /* next-6btns-dark-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FD515F513640088201B /* next-6btns-dark-pressed.png */; };
CC166FDA15F513640088201B /* next-6btns-dark-pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FD615F513640088201B /* next-6btns-dark-pressed@2x.png */; };
CC166FDB15F513640088201B /* next-6btns-dark.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FD715F513640088201B /* next-6btns-dark.png */; };
CC166FDC15F513640088201B /* next-6btns-dark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FD815F513640088201B /* next-6btns-dark@2x.png */; };
CC166FE115F5136B0088201B /* previous-6btns-dark-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FDD15F5136B0088201B /* previous-6btns-dark-pressed.png */; };
CC166FE215F5136B0088201B /* previous-6btns-dark-pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FDE15F5136B0088201B /* previous-6btns-dark-pressed@2x.png */; };
CC166FE315F5136B0088201B /* previous-6btns-dark.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FDF15F5136B0088201B /* previous-6btns-dark.png */; };
CC166FE415F5136B0088201B /* previous-6btns-dark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC166FE015F5136B0088201B /* previous-6btns-dark@2x.png */; };
CC206B3814ACFEAC007935C6 /* lion-window-close-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1314ACFEAC007935C6 /* lion-window-close-graphite.png */; };
CC206B3914ACFEAC007935C6 /* lion-window-close-on-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1414ACFEAC007935C6 /* lion-window-close-on-graphite.png */; };
CC206B3A14ACFEAC007935C6 /* lion-window-close-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1514ACFEAC007935C6 /* lion-window-close-on.png */; };
......@@ -620,6 +636,22 @@
CC166FB715F511DB0088201B /* backward-3btns-pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "backward-3btns-pressed@2x.png"; path = "Resources/mainwindow/backward-3btns-pressed@2x.png"; sourceTree = "<group>"; };
CC166FB815F511DB0088201B /* backward-3btns.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "backward-3btns.png"; path = "Resources/mainwindow/backward-3btns.png"; sourceTree = "<group>"; };
CC166FB915F511DB0088201B /* backward-3btns@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "backward-3btns@2x.png"; path = "Resources/mainwindow/backward-3btns@2x.png"; sourceTree = "<group>"; };
CC166FC415F5134A0088201B /* next-6btns-pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns-pressed.png"; path = "Resources/mainwindow/next-6btns-pressed.png"; sourceTree = "<group>"; };
CC166FC515F5134A0088201B /* next-6btns-pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns-pressed@2x.png"; path = "Resources/mainwindow/next-6btns-pressed@2x.png"; sourceTree = "<group>"; };
CC166FC615F5134A0088201B /* next-6btns.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns.png"; path = "Resources/mainwindow/next-6btns.png"; sourceTree = "<group>"; };
CC166FC715F5134A0088201B /* next-6btns@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns@2x.png"; path = "Resources/mainwindow/next-6btns@2x.png"; sourceTree = "<group>"; };
CC166FCD15F513560088201B /* previous-6btns-pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns-pressed.png"; path = "Resources/mainwindow/previous-6btns-pressed.png"; sourceTree = "<group>"; };
CC166FCE15F513560088201B /* previous-6btns-pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns-pressed@2x.png"; path = "Resources/mainwindow/previous-6btns-pressed@2x.png"; sourceTree = "<group>"; };
CC166FCF15F513560088201B /* previous-6btns.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns.png"; path = "Resources/mainwindow/previous-6btns.png"; sourceTree = "<group>"; };
CC166FD015F513560088201B /* previous-6btns@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns@2x.png"; path = "Resources/mainwindow/previous-6btns@2x.png"; sourceTree = "<group>"; };
CC166FD515F513640088201B /* next-6btns-dark-pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns-dark-pressed.png"; path = "Resources/mainwindow_dark/next-6btns-dark-pressed.png"; sourceTree = "<group>"; };
CC166FD615F513640088201B /* next-6btns-dark-pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns-dark-pressed@2x.png"; path = "Resources/mainwindow_dark/next-6btns-dark-pressed@2x.png"; sourceTree = "<group>"; };
CC166FD715F513640088201B /* next-6btns-dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns-dark.png"; path = "Resources/mainwindow_dark/next-6btns-dark.png"; sourceTree = "<group>"; };
CC166FD815F513640088201B /* next-6btns-dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "next-6btns-dark@2x.png"; path = "Resources/mainwindow_dark/next-6btns-dark@2x.png"; sourceTree = "<group>"; };
CC166FDD15F5136B0088201B /* previous-6btns-dark-pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns-dark-pressed.png"; path = "Resources/mainwindow_dark/previous-6btns-dark-pressed.png"; sourceTree = "<group>"; };
CC166FDE15F5136B0088201B /* previous-6btns-dark-pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns-dark-pressed@2x.png"; path = "Resources/mainwindow_dark/previous-6btns-dark-pressed@2x.png"; sourceTree = "<group>"; };
CC166FDF15F5136B0088201B /* previous-6btns-dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns-dark.png"; path = "Resources/mainwindow_dark/previous-6btns-dark.png"; sourceTree = "<group>"; };
CC166FE015F5136B0088201B /* previous-6btns-dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "previous-6btns-dark@2x.png"; path = "Resources/mainwindow_dark/previous-6btns-dark@2x.png"; sourceTree = "<group>"; };
CC1941240B9C1F8400635F6B /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
CC1C41D00D9BAD7F002728FA /* noart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = noart.png; path = Resources/noart.png; sourceTree = "<group>"; };
CC206B1314ACFEAC007935C6 /* lion-window-close-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lion-window-close-graphite.png"; sourceTree = "<group>"; };
......@@ -1133,6 +1165,14 @@
CC04326513B246E600D7D52E /* dark variant */ = {
isa = PBXGroup;
children = (
CC166FDD15F5136B0088201B /* previous-6btns-dark-pressed.png */,
CC166FDE15F5136B0088201B /* previous-6btns-dark-pressed@2x.png */,
CC166FDF15F5136B0088201B /* previous-6btns-dark.png */,
CC166FE015F5136B0088201B /* previous-6btns-dark@2x.png */,
CC166FD515F513640088201B /* next-6btns-dark-pressed.png */,
CC166FD615F513640088201B /* next-6btns-dark-pressed@2x.png */,
CC166FD715F513640088201B /* next-6btns-dark.png */,
CC166FD815F513640088201B /* next-6btns-dark@2x.png */,
CC166FAE15F511CC0088201B /* backward-3btns-dark-pressed.png */,
CC166FAF15F511CC0088201B /* backward-3btns-dark-pressed@2x.png */,
CC166FB015F511CC0088201B /* backward-3btns-dark.png */,
......@@ -1244,6 +1284,14 @@
CC0432C213B2479E00D7D52E /* bright variant */ = {
isa = PBXGroup;
children = (
CC166FCD15F513560088201B /* previous-6btns-pressed.png */,
CC166FCE15F513560088201B /* previous-6btns-pressed@2x.png */,
CC166FCF15F513560088201B /* previous-6btns.png */,
CC166FD015F513560088201B /* previous-6btns@2x.png */,
CC166FC415F5134A0088201B /* next-6btns-pressed.png */,
CC166FC515F5134A0088201B /* next-6btns-pressed@2x.png */,
CC166FC615F5134A0088201B /* next-6btns.png */,
CC166FC715F5134A0088201B /* next-6btns@2x.png */,
CC166FB615F511DB0088201B /* backward-3btns-pressed.png */,
CC166FB715F511DB0088201B /* backward-3btns-pressed@2x.png */,
CC166FB815F511DB0088201B /* backward-3btns.png */,
......@@ -2075,6 +2123,22 @@
CC166FBB15F511DB0088201B /* backward-3btns-pressed@2x.png in Resources */,
CC166FBC15F511DB0088201B /* backward-3btns.png in Resources */,
CC166FBD15F511DB0088201B /* backward-3btns@2x.png in Resources */,
CC166FC815F5134A0088201B /* next-6btns-pressed.png in Resources */,
CC166FC915F5134A0088201B /* next-6btns-pressed@2x.png in Resources */,
CC166FCA15F5134A0088201B /* next-6btns.png in Resources */,
CC166FCB15F5134A0088201B /* next-6btns@2x.png in Resources */,
CC166FD115F513560088201B /* previous-6btns-pressed.png in Resources */,
CC166FD215F513560088201B /* previous-6btns-pressed@2x.png in Resources */,
CC166FD315F513560088201B /* previous-6btns.png in Resources */,
CC166FD415F513560088201B /* previous-6btns@2x.png in Resources */,
CC166FD915F513640088201B /* next-6btns-dark-pressed.png in Resources */,
CC166FDA15F513640088201B /* next-6btns-dark-pressed@2x.png in Resources */,
CC166FDB15F513640088201B /* next-6btns-dark.png in Resources */,
CC166FDC15F513640088201B /* next-6btns-dark@2x.png in Resources */,
CC166FE115F5136B0088201B /* previous-6btns-dark-pressed.png in Resources */,
CC166FE215F5136B0088201B /* previous-6btns-dark-pressed@2x.png in Resources */,
CC166FE315F5136B0088201B /* previous-6btns-dark.png in Resources */,
CC166FE415F5136B0088201B /* previous-6btns-dark@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -719,11 +719,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
NSRect preliminaryFrame = [o_bwd_btn frame];
BOOL b_enabled = [o_bwd_btn isEnabled];
preliminaryFrame.size.width = 26.;
preliminaryFrame.size.width = 29.;
o_prev_btn = [[NSButton alloc] initWithFrame:preliminaryFrame];
[o_prev_btn setButtonType: NSMomentaryChangeButton];
[o_prev_btn setImage: [NSImage imageNamed:@"back-single"]];
[o_prev_btn setAlternateImage: [NSImage imageNamed:@"back-pressed-single"]];
[o_prev_btn setBezelStyle:NSRegularSquareBezelStyle];
[o_prev_btn setBordered:NO];
[o_prev_btn setTarget:self];
......@@ -735,8 +733,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_next_btn = [[NSButton alloc] initWithFrame:preliminaryFrame];
[o_next_btn setButtonType: NSMomentaryChangeButton];
[o_next_btn setImage: [NSImage imageNamed:@"forward-single"]];
[o_next_btn setAlternateImage: [NSImage imageNamed:@"forward-pressed-single"]];
[o_next_btn setBezelStyle:NSRegularSquareBezelStyle];
[o_next_btn setBordered:NO];
[o_next_btn setTarget:self];
......@@ -746,12 +742,24 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_next_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item.") forAttribute:NSAccessibilityDescriptionAttribute];
[o_next_btn setEnabled: b_enabled];
if (b_dark_interface) {
[o_prev_btn setImage: [NSImage imageNamed:@"previous-6btns-dark"]];
[o_prev_btn setAlternateImage: [NSImage imageNamed:@"previous-6btns-dark-pressed"]];
[o_next_btn setImage: [NSImage imageNamed:@"next-6btns-dark"]];
[o_next_btn setAlternateImage: [NSImage imageNamed:@"next-6btns-dark-pressed"]];
} else {
[o_prev_btn setImage: [NSImage imageNamed:@"previous-6btns"]];
[o_prev_btn setAlternateImage: [NSImage imageNamed:@"previous-6btns-pressed"]];
[o_next_btn setImage: [NSImage imageNamed:@"next-6btns"]];
[o_next_btn setAlternateImage: [NSImage imageNamed:@"next-6btns-pressed"]];
}
/* change the accessibility help for the backward/forward buttons accordingly */
[[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click and hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
[[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click and hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
NSRect frame;
float f_space = 32.;
float f_space = 30.;
#define moveItem( item ) \
frame = [item frame]; \
frame.origin.x = frame.origin.x + f_space; \
......@@ -763,7 +771,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem( o_bwd_btn );
moveItem( o_play_btn );
moveItem( o_fwd_btn );
f_space = 62.;
f_space = 59.;
moveItem( o_stop_btn );
moveItem( o_playlist_btn );
moveItem( o_repeat_btn );
......@@ -785,7 +793,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
resizeItem( o_time_sld_fancygradient_view );
#undef resizeItem
preliminaryFrame.origin.x = [o_next_btn frame].origin.x + 80. + [o_fwd_btn frame].size.width;
preliminaryFrame.origin.x = [o_next_btn frame].origin.x + 85. + [o_fwd_btn frame].size.width;
[o_next_btn setFrame: preliminaryFrame];
// wait until the animation is done, if displayed
......@@ -823,7 +831,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item. Hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
NSRect frame;
float f_space = 32.;
float f_space = 30.;
#define moveItem( item ) \
frame = [item frame]; \
frame.origin.x = frame.origin.x - f_space; \
......@@ -835,7 +843,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem( o_bwd_btn );
moveItem( o_play_btn );
moveItem( o_fwd_btn );
f_space = 62.;
f_space = 59.;
moveItem( o_stop_btn );
moveItem( o_playlist_btn );
moveItem( o_repeat_btn );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment