Commit 1ee08fc6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: implemented graphics for forward/backward in the 6 button state

parent c48eb700
......@@ -195,6 +195,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/backward-3btns-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/backward-3btns.png \
extras/package/macosx/Resources/mainwindow/backward-3btns@2x.png \
extras/package/macosx/Resources/mainwindow/backward-6btns-pressed.png \
extras/package/macosx/Resources/mainwindow/backward-6btns-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/backward-6btns.png \
extras/package/macosx/Resources/mainwindow/backward-6btns@2x.png \
extras/package/macosx/Resources/mainwindow/bottom-background.png \
extras/package/macosx/Resources/mainwindow/bottom-background@2x.png \
extras/package/macosx/Resources/mainwindow/bottombar-mini.png \
......@@ -215,6 +219,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/forward-3btns-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/forward-3btns.png \
extras/package/macosx/Resources/mainwindow/forward-3btns@2x.png \
extras/package/macosx/Resources/mainwindow/forward-6btns-pressed.png \
extras/package/macosx/Resources/mainwindow/forward-6btns-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/forward-6btns.png \
extras/package/macosx/Resources/mainwindow/forward-6btns@2x.png \
extras/package/macosx/Resources/mainwindow/fullscreen-double-buttons-pressed.png \
extras/package/macosx/Resources/mainwindow/fullscreen-double-buttons-pressed@2x.png \
extras/package/macosx/Resources/mainwindow/fullscreen-double-buttons.png \
......@@ -307,6 +315,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/backward-3btns-dark-pressed@2x.png \
extras/package/macosx/Resources/mainwindow_dark/backward-3btns-dark.png \
extras/package/macosx/Resources/mainwindow_dark/backward-3btns-dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/backward-6btns-dark-pressed.png \
extras/package/macosx/Resources/mainwindow_dark/backward-6btns-dark-pressed@2x.png \
extras/package/macosx/Resources/mainwindow_dark/backward-6btns-dark.png \
extras/package/macosx/Resources/mainwindow_dark/backward-6btns-dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/bottom-background_dark.png \
extras/package/macosx/Resources/mainwindow_dark/bottom-background_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/bottombar-mini.png \
......@@ -328,6 +340,10 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/forward-3btns-dark-pressed@2x.png \
extras/package/macosx/Resources/mainwindow_dark/forward-3btns-dark.png \
extras/package/macosx/Resources/mainwindow_dark/forward-3btns-dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/forward-6btns-dark-pressed.png \
extras/package/macosx/Resources/mainwindow_dark/forward-6btns-dark-pressed@2x.png \
extras/package/macosx/Resources/mainwindow_dark/forward-6btns-dark.png \
extras/package/macosx/Resources/mainwindow_dark/forward-6btns-dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/fullscreen-double-buttons-pressed_dark.png \
extras/package/macosx/Resources/mainwindow_dark/fullscreen-double-buttons-pressed_dark@2x.png \
extras/package/macosx/Resources/mainwindow_dark/fullscreen-double-buttons_dark.png \
......
......@@ -759,7 +759,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click and hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
NSRect frame;
float f_space = 30.;
frame = [o_bwd_btn frame];
frame.size.width++;
[o_bwd_btn setFrame:frame];
frame = [o_fwd_btn frame];
frame.size.width++;
[o_fwd_btn setFrame:frame];
float f_space = 29.;
#define moveItem( item ) \
frame = [item frame]; \
frame.origin.x = frame.origin.x + f_space; \
......@@ -770,8 +777,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem( o_bwd_btn );
moveItem( o_play_btn );
f_space = 28.;
moveItem( o_fwd_btn );
f_space = 59.;
f_space = 57.;
moveItem( o_stop_btn );
moveItem( o_playlist_btn );
moveItem( o_repeat_btn );
......@@ -793,7 +801,19 @@ static VLCMainWindow *_o_sharedInstance = nil;
resizeItem( o_time_sld_fancygradient_view );
#undef resizeItem
preliminaryFrame.origin.x = [o_next_btn frame].origin.x + 85. + [o_fwd_btn frame].size.width;
if (b_dark_interface) {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-6btns-dark"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-6btns-dark-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-6btns-dark"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-6btns-dark-pressed"]];
} else {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-6btns"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-6btns-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-6btns"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-6btns-pressed"]];
}
preliminaryFrame.origin.x = [o_next_btn frame].origin.x + 82. + [o_fwd_btn frame].size.width;
[o_next_btn setFrame: preliminaryFrame];
// wait until the animation is done, if displayed
......@@ -831,7 +851,14 @@ 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 = 30.;
frame = [o_bwd_btn frame];
frame.size.width--;
[o_bwd_btn setFrame:frame];
frame = [o_fwd_btn frame];
frame.size.width--;
[o_fwd_btn setFrame:frame];
float f_space = 29.;
#define moveItem( item ) \
frame = [item frame]; \
frame.origin.x = frame.origin.x - f_space; \
......@@ -842,8 +869,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem( o_bwd_btn );
moveItem( o_play_btn );
f_space = 28.;
moveItem( o_fwd_btn );
f_space = 59.;
f_space = 57.;
moveItem( o_stop_btn );
moveItem( o_playlist_btn );
moveItem( o_repeat_btn );
......@@ -865,6 +893,18 @@ static VLCMainWindow *_o_sharedInstance = nil;
resizeItem( o_time_sld_fancygradient_view );
#undef resizeItem
if (b_dark_interface) {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-3btns-dark"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-3btns-dark-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-3btns-dark"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-3btns-dark-pressed"]];
} else {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-3btns"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-3btns-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-3btns"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-3btns-pressed"]];
}
[o_bottombar_view setNeedsDisplay:YES];
[o_fwd_btn setAction:@selector(fwd:)];
......
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