X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=macosx%2FHBImageAndTextCell.m;h=ff860c66f11fc47c5984d5ef0f705907c6b996eb;hb=240cf3308bf21be4d1918a71a5510d07e7d6d85b;hp=7052c357d06375eee4f14c13cf461fdde4b8280e;hpb=4dde8851c3319932e3f02bf9ff06b356a6c43ece;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/macosx/HBImageAndTextCell.m b/macosx/HBImageAndTextCell.m index 7052c357..ff860c66 100644 --- a/macosx/HBImageAndTextCell.m +++ b/macosx/HBImageAndTextCell.m @@ -1,7 +1,7 @@ /* HBImageAndTextCell This file is part of the HandBrake source code. - Homepage: . + Homepage: . It may be used under the terms of the GNU General Public License. */ @@ -9,25 +9,25 @@ #import "HBImageAndTextCell.h" -static inline float +static inline CGFloat xLeftInRect(NSSize innerSize, NSRect outerRect) { return NSMinX(outerRect); } -static inline float +static inline CGFloat xCenterInRect(NSSize innerSize, NSRect outerRect) { return MAX(NSMidX(outerRect) - (innerSize.width/2.0), 0.0); } -static inline float +static inline CGFloat xRightInRect(NSSize innerSize, NSRect outerRect) { return MAX(NSMaxX(outerRect) - innerSize.width, 0.0); } -static inline float +static inline CGFloat yTopInRect(NSSize innerSize, NSRect outerRect, BOOL flipped) { if (flipped) @@ -36,13 +36,13 @@ yTopInRect(NSSize innerSize, NSRect outerRect, BOOL flipped) return MAX(NSMaxY(outerRect) - innerSize.height, 0.0); } -static inline float +static inline CGFloat yCenterInRect(NSSize innerSize, NSRect outerRect, BOOL flipped) { return MAX(NSMidY(outerRect) - innerSize.height/2.0, 0.0); } -static inline float +static inline CGFloat yBottomInRect(NSSize innerSize, NSRect outerRect, BOOL flipped) { if (flipped) @@ -54,7 +54,7 @@ yBottomInRect(NSSize innerSize, NSRect outerRect, BOOL flipped) static inline NSSize scaleProportionally(NSSize imageSize, NSRect canvasRect) { - float ratio; + CGFloat ratio; // get the smaller ratio and scale the image size by it ratio = MIN(NSWidth(canvasRect) / imageSize.width, @@ -145,7 +145,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect) [super editWithFrame: textFrame inView: controlView editor:textObj delegate:anObject event: theEvent]; } -- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength +- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength { NSRect textFrame, imageFrame; NSDivideRect (aRect, &imageFrame, &textFrame, (imageSpacing.width * 2) + [image size].width, NSMinXEdge);