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 \
......
......@@ -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