Commit 840d653f authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: implemented the 'autoscale' feature and fixed some resizing bugs

parent f4f58eb9
......@@ -21,14 +21,14 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="2730"/>
<integer value="21"/>
<integer value="915"/>
<integer value="2"/>
<integer value="283"/>
<integer value="4596"/>
<integer value="2730"/>
<integer value="1617"/>
<integer value="334"/>
<integer value="283"/>
<integer value="4722"/>
<integer value="4596"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -861,7 +861,7 @@
<object class="BGHUDLabel" id="609070979">
<reference key="NSNextResponder" ref="440594360"/>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{4, 257}, {154, 14}}</string>
<string key="NSFrame">{{4, 257}, {362, 14}}</string>
<reference key="NSSuperview" ref="440594360"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
......@@ -884,7 +884,7 @@
<object class="NSSearchField" id="596740638">
<reference key="NSNextResponder" ref="440594360"/>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{371, 255}, {110, 19}}</string>
<string key="NSFrame">{{371, 254}, {110, 19}}</string>
<reference key="NSSuperview" ref="440594360"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
......@@ -1227,7 +1227,9 @@
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMinSize">{400, 310}</string>
<string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<string key="NSFrameAutosaveName">vlc-10thanniversary</string>
<string key="NSFrameAutosaveName">mainwindow</string>
<bool key="NSAutorecalculatesContentBorderThicknessMinY">NO</bool>
<bool key="NSAutorecalculatesContentBorderThicknessMaxY">NO</bool>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSMenu" id="782168084">
......@@ -4431,10 +4433,11 @@ LCAuLi4</string>
<int key="NSBoxType">0</int>
<int key="NSTitlePosition">0</int>
<bool key="NSTransparent">NO</bool>
<bool key="NSFullyTransparent">YES</bool>
</object>
<object class="NSImageView" id="619354303">
<reference key="NSNextResponder" ref="256817023"/>
<int key="NSvFlags">306</int>
<int key="NSvFlags">274</int>
<object class="NSMutableSet" key="NSDragTypes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="set.sortedObjects">
......@@ -11378,7 +11381,7 @@ LCAuLi4</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDJsYAwpIAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABCJAAAwhQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>VLBrushedMetalImageView</string>
......
......@@ -584,8 +584,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
var_SetFloat( p_vout, "zoom", 2.0 );
else
{
if (![[VLCMainWindow sharedInstance] isZoomed])
[[VLCMainWindow sharedInstance] performZoom: sender];
var_ToggleBool( p_vout, "autoscale" );
}
vlc_object_release( p_vout );
}
......
......@@ -217,6 +217,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_video_view setFrame: [o_split_view frame]];
o_temp_view = [[NSView alloc] init];
[o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[o_dropzone_view setFrame: [o_playlist_table frame]];
/* create the sidebar */
o_sidebaritems = [[NSMutableArray alloc] init];
......@@ -313,12 +314,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_sidebar_view reloadData];
[o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:YES];
playlist_t *p_playlist = pl_Get( VLCIntf );
PL_LOCK;
if( playlist_CurrentSize( p_playlist ) < 1 )
[self showDropZone];
PL_UNLOCK;
}
#pragma mark -
......@@ -569,7 +564,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)showDropZone
{
[o_right_split_view addSubview: o_dropzone_view];
[[o_dropzone_view animator] setFrame: [o_playlist_table frame]];
[o_dropzone_view setFrame: [o_playlist_table frame]];
[[o_playlist_table animator] setHidden:YES];
}
......@@ -939,7 +934,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if ([screen isMainScreen])
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
[[o_video_view superview] replaceSubview:o_dropzone_view with:o_temp_view];
[[o_video_view superview] replaceSubview:o_video_view with:o_temp_view];
[o_temp_view setFrame:[o_video_view frame]];
[o_fullscreen_window setContentView:o_video_view];
......
......@@ -298,7 +298,6 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
break;
case INPUT_EVENT_ABORT:
//NSLog( @"input stopped by user" );
break;
default:
......@@ -609,6 +608,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[self _removeOldPreferences];
[o_mainwindow updateWindow];
[o_mainwindow updateTimeSlider];
[o_mainwindow updateVolumeSlider];
[o_mainwindow makeKeyAndOrderFront: self];
......@@ -1252,6 +1252,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[o_playlist updateRowSelection];
[o_mainwindow updateWindow];
[o_mainwindow updateName];
[o_mainmenu setupMenus];
[o_mainmenu updatePlaybackRate];
}
......
......@@ -302,8 +302,12 @@ static int Control (vout_display_t *vd, int query, va_list ap)
[[sys->glView window] setLevel: NSNormalWindowLevel];
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
{
[[sys->glView window] performZoom: nil];
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
case VOUT_DISPLAY_CHANGE_ZOOM:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
......
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