Commit 8f64d1c1 authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix position and functionality of buttons when jump buttons are activated

parent 47216fd1
...@@ -578,26 +578,26 @@ frame.origin.x = f_width + frame.origin.x; \ ...@@ -578,26 +578,26 @@ frame.origin.x = f_width + frame.origin.x; \
NSRect frame; NSRect frame;
frame = [o_bwd_btn frame]; frame = [o_bwd_btn frame];
frame.size.width++; frame.size.width--;
[o_bwd_btn setFrame:frame]; [o_bwd_btn setFrame:frame];
frame = [o_fwd_btn frame]; frame = [o_fwd_btn frame];
frame.size.width++; frame.size.width--;
[o_fwd_btn setFrame:frame]; [o_fwd_btn setFrame:frame];
float f_space = 29.;
#define moveItem(item) \ #define moveItem(item) \
frame = [item frame]; \ frame = [item frame]; \
frame.origin.x = frame.origin.x + f_space; \ frame.origin.x = frame.origin.x + f_space; \
if (b_fast) \ if (b_fast) \
[item setFrame: frame]; \ [item setFrame: frame]; \
else \ else \
[[item animator] setFrame: frame] [[item animator] setFrame: frame]
float f_space = 29.;
moveItem(o_bwd_btn); moveItem(o_bwd_btn);
moveItem(o_play_btn);
f_space = 28.; f_space = 28.;
moveItem(o_play_btn);
moveItem(o_fwd_btn); moveItem(o_fwd_btn);
f_space = 57.; f_space = 28. * 2;
moveItem(o_stop_btn); moveItem(o_stop_btn);
moveItem(o_playlist_btn); moveItem(o_playlist_btn);
moveItem(o_repeat_btn); moveItem(o_repeat_btn);
...@@ -624,7 +624,7 @@ else \ ...@@ -624,7 +624,7 @@ else \
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-6btns-pressed"]]; [[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; preliminaryFrame.origin.x = [o_prev_btn frame].origin.x + [o_prev_btn frame].size.width + [o_bwd_btn frame].size.width + [o_play_btn frame].size.width + [o_fwd_btn frame].size.width;
[o_next_btn setFrame: preliminaryFrame]; [o_next_btn setFrame: preliminaryFrame];
// wait until the animation is done, if displayed // wait until the animation is done, if displayed
...@@ -655,7 +655,9 @@ else \ ...@@ -655,7 +655,9 @@ else \
[o_prev_btn removeFromSuperviewWithoutNeedingDisplay]; [o_prev_btn removeFromSuperviewWithoutNeedingDisplay];
[o_next_btn removeFromSuperviewWithoutNeedingDisplay]; [o_next_btn removeFromSuperviewWithoutNeedingDisplay];
[o_prev_btn release]; [o_prev_btn release];
o_prev_btn = NULL;
[o_next_btn release]; [o_next_btn release];
o_next_btn = NULL;
/* change the accessibility help for the backward/forward buttons accordingly */ /* change the accessibility help for the backward/forward buttons accordingly */
[[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute]; [[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
...@@ -663,26 +665,26 @@ else \ ...@@ -663,26 +665,26 @@ else \
NSRect frame; NSRect frame;
frame = [o_bwd_btn frame]; frame = [o_bwd_btn frame];
frame.size.width--; frame.size.width++;
[o_bwd_btn setFrame:frame]; [o_bwd_btn setFrame:frame];
frame = [o_fwd_btn frame]; frame = [o_fwd_btn frame];
frame.size.width--; frame.size.width++;
[o_fwd_btn setFrame:frame]; [o_fwd_btn setFrame:frame];
float f_space = 29.;
#define moveItem(item) \ #define moveItem(item) \
frame = [item frame]; \ frame = [item frame]; \
frame.origin.x = frame.origin.x - f_space; \ frame.origin.x = frame.origin.x - f_space; \
if (b_fast) \ if (b_fast) \
[item setFrame: frame]; \ [item setFrame: frame]; \
else \ else \
[[item animator] setFrame: frame] [[item animator] setFrame: frame]
float f_space = 29.;
moveItem(o_bwd_btn); moveItem(o_bwd_btn);
moveItem(o_play_btn);
f_space = 28.; f_space = 28.;
moveItem(o_play_btn);
moveItem(o_fwd_btn); moveItem(o_fwd_btn);
f_space = 57.; f_space = 28. * 2;
moveItem(o_stop_btn); moveItem(o_stop_btn);
moveItem(o_playlist_btn); moveItem(o_playlist_btn);
moveItem(o_repeat_btn); moveItem(o_repeat_btn);
...@@ -804,6 +806,16 @@ else \ ...@@ -804,6 +806,16 @@ else \
[[VLCCoreInteraction sharedInstance] next]; [[VLCCoreInteraction sharedInstance] next];
} }
// alternative actions for forward / backward buttons when next / prev are activated
- (IBAction)forward:(id)sender
{
[[VLCCoreInteraction sharedInstance] forwardExtraShort];
}
- (IBAction)backward:(id)sender
{
[[VLCCoreInteraction sharedInstance] backwardExtraShort];
}
- (void)setRepeatOne - (void)setRepeatOne
{ {
......
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