From: masakih Date: Sat, 7 Mar 2015 15:28:18 +0000 (+0900) Subject: ビューコントローラから大きさを貰うようにした X-Git-Tag: 1.2beta1~12 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4d7757b856060e617da7468531ccc81639a0f468;p=kcd%2FKCD.git ビューコントローラから大きさを貰うようにした --- diff --git a/KCD/HMBroserWindowController.m b/KCD/HMBroserWindowController.m index a9fe4c5a..e5f57143 100644 --- a/KCD/HMBroserWindowController.m +++ b/KCD/HMBroserWindowController.m @@ -256,20 +256,25 @@ typedef NS_ENUM(NSInteger, ViewType) { } -const CGFloat normalFleetListHeight = 288; -const CGFloat fleetListUpsideHeight = 159; + +#pragma mark - FleetView position const CGFloat margin = 1; +- (IBAction)hideFleet:(id)sender +{ + NSView +} + - (IBAction)fleetListAbove:(id)sender { NSSize windowContentSize = [self.window.contentView frame].size; NSRect flashRect = self.placeholder.frame; - flashRect.origin.y = windowContentSize.height - flashRect.size.height - normalFleetListHeight; + flashRect.origin.y = windowContentSize.height - flashRect.size.height - self.fleetViewController.normalHeight; self.placeholder.animator.frame = flashRect; NSRect fleetListRect = self.fleetViewController.view.frame; - fleetListRect.size.height = normalFleetListHeight; + fleetListRect.size.height = self.fleetViewController.normalHeight; fleetListRect.origin.y = windowContentSize.height - fleetListRect.size.height; self.fleetViewController.view.animator.frame = fleetListRect; } @@ -282,7 +287,7 @@ const CGFloat margin = 1; self.placeholder.animator.frame = flashRect; NSRect fleetListRect = self.fleetViewController.view.frame; - fleetListRect.size.height = normalFleetListHeight; + fleetListRect.size.height = self.fleetViewController.normalHeight; fleetListRect.origin.y = windowContentSize.height - fleetListRect.size.height - flashRect.size.height - margin; self.fleetViewController.view.animator.frame = fleetListRect; } @@ -291,11 +296,11 @@ const CGFloat margin = 1; NSSize windowContentSize = [self.window.contentView frame].size; NSRect flashRect = self.placeholder.frame; - flashRect.origin.y = windowContentSize.height - flashRect.size.height - fleetListUpsideHeight - margin; + flashRect.origin.y = windowContentSize.height - flashRect.size.height - self.fleetViewController.upsideHeight - margin; self.placeholder.animator.frame = flashRect; NSRect fleetListRect = self.fleetViewController.view.frame; - fleetListRect.size.height = normalFleetListHeight + flashRect.size.height + margin + margin; + fleetListRect.size.height = self.fleetViewController.normalHeight + flashRect.size.height + margin + margin; fleetListRect.origin.y = windowContentSize.height - fleetListRect.size.height; self.fleetViewController.view.animator.frame = fleetListRect; } diff --git a/KCD/ja.lproj/HMBroserWindowController.xib b/KCD/ja.lproj/HMBroserWindowController.xib index b8be4f6c..89bf4d16 100644 --- a/KCD/ja.lproj/HMBroserWindowController.xib +++ b/KCD/ja.lproj/HMBroserWindowController.xib @@ -30,7 +30,7 @@ - + @@ -77,6 +77,13 @@ + + + + + + + @@ -400,14 +407,14 @@ - + - + - + @@ -436,7 +443,7 @@ - + @@ -459,13 +466,6 @@ - - - - - - -