Commit a75b97ad authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed confusing interface behavior of the crop filter controls

parent 23927fbb
...@@ -58,12 +58,16 @@ ...@@ -58,12 +58,16 @@
/* crop */ /* crop */
IBOutlet id o_crop_top_lbl; IBOutlet id o_crop_top_lbl;
IBOutlet id o_crop_top_fld; IBOutlet id o_crop_top_fld;
IBOutlet id o_crop_top_stp;
IBOutlet id o_crop_left_lbl; IBOutlet id o_crop_left_lbl;
IBOutlet id o_crop_left_fld; IBOutlet id o_crop_left_fld;
IBOutlet id o_crop_left_stp;
IBOutlet id o_crop_right_lbl; IBOutlet id o_crop_right_lbl;
IBOutlet id o_crop_right_fld; IBOutlet id o_crop_right_fld;
IBOutlet id o_crop_right_stp;
IBOutlet id o_crop_bottom_lbl; IBOutlet id o_crop_bottom_lbl;
IBOutlet id o_crop_bottom_fld; IBOutlet id o_crop_bottom_fld;
IBOutlet id o_crop_bottom_stp;
IBOutlet id o_crop_sync_top_bottom_ckb; IBOutlet id o_crop_sync_top_bottom_ckb;
IBOutlet id o_crop_sync_left_right_ckb; IBOutlet id o_crop_sync_left_right_ckb;
......
...@@ -564,12 +564,44 @@ static VLCVideoEffects *_o_sharedInstance = nil; ...@@ -564,12 +564,44 @@ static VLCVideoEffects *_o_sharedInstance = nil;
#pragma mark - #pragma mark -
#pragma mark crop #pragma mark crop
#define updateopposite( giver, taker ) \
if (sender == giver) \
[taker setIntValue: [giver intValue]]
- (IBAction)cropObjectChanged:(id)sender - (IBAction)cropObjectChanged:(id)sender
{ {
if( [o_crop_sync_top_bottom_ckb state] ) updateopposite( o_crop_top_fld, o_crop_top_stp );
[o_crop_bottom_fld setIntValue: [o_crop_top_fld intValue]]; updateopposite( o_crop_top_stp, o_crop_top_fld );
if( [o_crop_sync_left_right_ckb state] ) updateopposite( o_crop_left_fld, o_crop_left_stp );
[o_crop_right_fld setIntValue: [o_crop_left_fld intValue]]; updateopposite( o_crop_left_stp, o_crop_left_fld );
updateopposite( o_crop_right_fld, o_crop_right_stp );
updateopposite( o_crop_right_stp, o_crop_right_fld );
updateopposite( o_crop_bottom_fld, o_crop_bottom_stp );
updateopposite( o_crop_bottom_stp, o_crop_bottom_fld );
if( [o_crop_sync_top_bottom_ckb state] ) {
if (sender == o_crop_top_fld || sender == o_crop_top_stp ) {
[o_crop_bottom_fld setIntValue: [o_crop_top_fld intValue]];
[o_crop_bottom_stp setIntValue: [o_crop_top_fld intValue]];
}
else
{
[o_crop_top_fld setIntValue: [o_crop_bottom_fld intValue]];
[o_crop_top_stp setIntValue: [o_crop_bottom_fld intValue]];
}
}
if( [o_crop_sync_left_right_ckb state] ) {
if (sender == o_crop_left_fld || sender == o_crop_left_stp ) {
[o_crop_right_fld setIntValue: [o_crop_left_fld intValue]];
[o_crop_right_stp setIntValue: [o_crop_left_fld intValue]];
}
else
{
[o_crop_left_fld setIntValue: [o_crop_right_fld intValue]];
[o_crop_left_stp setIntValue: [o_crop_right_fld intValue]];
}
}
vout_thread_t *p_vout = getVout(); vout_thread_t *p_vout = getVout();
if( p_vout ) { if( p_vout ) {
...@@ -581,6 +613,8 @@ static VLCVideoEffects *_o_sharedInstance = nil; ...@@ -581,6 +613,8 @@ static VLCVideoEffects *_o_sharedInstance = nil;
} }
} }
#undef updateopposite
#pragma mark - #pragma mark -
#pragma mark geometry #pragma mark geometry
- (IBAction)enableTransform:(id)sender - (IBAction)enableTransform:(id)sender
......
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