mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 18:30:58 +00:00
Fixed drawing of titles.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5071 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ee51d19b16
commit
678792c86f
1 changed files with 29 additions and 8 deletions
|
@ -152,6 +152,34 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface GSBrowserTitleCell: NSTextFieldCell
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation GSBrowserTitleCell
|
||||||
|
- (id) initTextCell: (NSString *)aString
|
||||||
|
{
|
||||||
|
[super initTextCell: aString];
|
||||||
|
|
||||||
|
[self setTextColor: [NSColor windowFrameTextColor]];
|
||||||
|
[self setBackgroundColor: [NSColor controlShadowColor]];
|
||||||
|
[self setEditable: NO];
|
||||||
|
[self setBezeled: YES];
|
||||||
|
[self setAlignment: NSCenterTextAlignment];
|
||||||
|
draw_background = YES;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||||
|
{
|
||||||
|
if (NSIsEmptyRect (cellFrame))
|
||||||
|
return;
|
||||||
|
|
||||||
|
[controlView lockFocus];
|
||||||
|
NSDrawGrayBezel (cellFrame, NSZeroRect);
|
||||||
|
[controlView unlockFocus];
|
||||||
|
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
//
|
//
|
||||||
// Private NSBrowser methods
|
// Private NSBrowser methods
|
||||||
//
|
//
|
||||||
|
@ -227,14 +255,7 @@
|
||||||
_passiveDelegate = YES;
|
_passiveDelegate = YES;
|
||||||
_doubleAction = NULL;
|
_doubleAction = NULL;
|
||||||
_browserColumns = [[NSMutableArray alloc] init];
|
_browserColumns = [[NSMutableArray alloc] init];
|
||||||
_titleCell = [NSTextFieldCell new];
|
_titleCell = [GSBrowserTitleCell new];
|
||||||
[_titleCell setEditable: NO];
|
|
||||||
[_titleCell setTextColor: [NSColor windowFrameTextColor]];
|
|
||||||
[_titleCell setBackgroundColor: [NSColor controlShadowColor]];
|
|
||||||
[_titleCell setDrawsBackground: YES];
|
|
||||||
//[_titleCell setBordered: YES];
|
|
||||||
[_titleCell setBezeled: YES];
|
|
||||||
[_titleCell setAlignment: NSCenterTextAlignment];
|
|
||||||
|
|
||||||
// Calculate geometry
|
// Calculate geometry
|
||||||
[self tile];
|
[self tile];
|
||||||
|
|
Loading…
Reference in a new issue