diff --git a/mozilla/camino/src/browser/LocationBar.h b/mozilla/camino/src/browser/LocationBar.h index 5fe9e3a4a4c..9257ca4edb0 100644 --- a/mozilla/camino/src/browser/LocationBar.h +++ b/mozilla/camino/src/browser/LocationBar.h @@ -23,8 +23,11 @@ #import -@interface LocationBar : NSView { - +@interface LocationBar : NSView +{ + // we'll use a cell to draw the border, since there isn't a method + // we can call to draw a nice bevel ourselves. + NSTextFieldCell* mBorderCell; } @end diff --git a/mozilla/camino/src/browser/LocationBar.mm b/mozilla/camino/src/browser/LocationBar.mm index f70873d9666..64ff103f003 100644 --- a/mozilla/camino/src/browser/LocationBar.mm +++ b/mozilla/camino/src/browser/LocationBar.mm @@ -40,17 +40,28 @@ @implementation LocationBar -- (void)drawRect:(NSRect)aRect +- (id)initWithFrame:(NSRect)frameRect { - // Frame the border. - //NSDrawLightBezel([self bounds], aRect); + if ((self = [super initWithFrame:frameRect])) + { + mBorderCell = [[NSTextFieldCell alloc] initTextCell:@""]; + [mBorderCell setBezeled:YES]; - [[NSColor colorWithCalibratedWhite: 0.98 alpha: 1.0] set]; - NSRectFill(aRect); - - [[NSColor colorWithCalibratedWhite: 0.90 alpha: 1.0] set]; - NSFrameRectWithWidth([self bounds], 2.0); + // For 10.2, we could do this, but we'd have to tweak the spacing for the proxy icon + //[mBorderCell setBezelStyle:NSTextFieldRoundedBezel]; + } + return self; } +- (void)dealloc +{ + [mBorderCell release]; + [super dealloc]; +} + +- (void)drawRect:(NSRect)aRect +{ + [mBorderCell drawWithFrame:[self bounds] inView:self]; +} @end