resize video after keep aspect menu item toggle

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15910 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nplourde 2005-07-03 14:28:51 +00:00
parent 5057bb628b
commit 96a22de4e6
2 changed files with 5 additions and 2 deletions

View File

@ -360,7 +360,7 @@ static uint32_t control(uint32_t request, void *data, ...)
kDoubleScreenCmd = menuItem; kDoubleScreenCmd = menuItem;
menuItem = [[NSMenuItem alloc] initWithTitle:@"Full Size" action:@selector(menuAction:) keyEquivalent:@"f"]; [menu addItem:menuItem]; menuItem = [[NSMenuItem alloc] initWithTitle:@"Full Size" action:@selector(menuAction:) keyEquivalent:@"f"]; [menu addItem:menuItem];
kFullScreenCmd = menuItem; kFullScreenCmd = menuItem;
//menuItem = (NSMenuItem *)[NSMenuItem separatorItem]; [menu addItem:menuItem]; menuItem = (NSMenuItem *)[NSMenuItem separatorItem]; [menu addItem:menuItem];
NSMenu *aspectMenu; NSMenu *aspectMenu;
aspectMenu = [[NSMenu alloc] initWithTitle:@"Aspect Ratio"]; aspectMenu = [[NSMenu alloc] initWithTitle:@"Aspect Ratio"];
@ -370,7 +370,7 @@ static uint32_t control(uint32_t request, void *data, ...)
menuItem = [[NSMenuItem alloc] initWithTitle:@"Pan-Scan" action:@selector(menuAction:) keyEquivalent:@""]; [aspectMenu addItem:menuItem]; menuItem = [[NSMenuItem alloc] initWithTitle:@"Pan-Scan" action:@selector(menuAction:) keyEquivalent:@""]; [aspectMenu addItem:menuItem];
if(vo_panscan) [menuItem setState:NSOnState]; if(vo_panscan) [menuItem setState:NSOnState];
kPanScanCmd = menuItem; kPanScanCmd = menuItem;
menuItem = (NSMenuItem *)[NSMenuItem separatorItem]; [menu addItem:menuItem]; menuItem = (NSMenuItem *)[NSMenuItem separatorItem]; [aspectMenu addItem:menuItem];
menuItem = [[NSMenuItem alloc] initWithTitle:@"Original" action:@selector(menuAction:) keyEquivalent:@""]; [aspectMenu addItem:menuItem]; menuItem = [[NSMenuItem alloc] initWithTitle:@"Original" action:@selector(menuAction:) keyEquivalent:@""]; [aspectMenu addItem:menuItem];
kAspectOrgCmd = menuItem; kAspectOrgCmd = menuItem;
menuItem = [[NSMenuItem alloc] initWithTitle:@"4:3" action:@selector(menuAction:) keyEquivalent:@""]; [aspectMenu addItem:menuItem]; menuItem = [[NSMenuItem alloc] initWithTitle:@"4:3" action:@selector(menuAction:) keyEquivalent:@""]; [aspectMenu addItem:menuItem];
@ -468,6 +468,8 @@ static uint32_t control(uint32_t request, void *data, ...)
[kKeepAspectCmd setState:NSOnState]; [kKeepAspectCmd setState:NSOnState];
else else
[kKeepAspectCmd setState:NSOffState]; [kKeepAspectCmd setState:NSOffState];
[self reshape];
} }
if(sender == kPanScanCmd) if(sender == kPanScanCmd)

View File

@ -423,6 +423,7 @@ static OSStatus WindowEventHandler(EventHandlerCallRef nextHandler, EventRef eve
case kKeepAspectCmd: case kKeepAspectCmd:
vo_keepaspect = (!(vo_keepaspect)); vo_keepaspect = (!(vo_keepaspect));
CheckMenuItem (aspectMenu, 1, vo_keepaspect); CheckMenuItem (aspectMenu, 1, vo_keepaspect);
window_resized();
break; break;
case kAspectOrgCmd: case kAspectOrgCmd: