From c16bf3d48c556e036ac4efd19b7fcd5c8b5fde7b Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 7 Feb 2001 11:17:38 +0000 Subject: [PATCH] Miniwindow style improvements. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9018 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSWindow.m | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1950bb8b9..0e741b8f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-07 Richard Frith-Macdonald + + * Source/NSWindow.m: Modified miniwindow view drawing to make titles + in miniwindows look like NeXT ones. + 2001-02-06 Richard Frith-Macdonald * Source/NSMenuView.m: ([-mouseDown:]) modified code for checking diff --git a/Source/NSWindow.m b/Source/NSWindow.m index c610f5988..8322cad01 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -194,14 +195,14 @@ BOOL GSViewAcceptsDrag(NSView *v, id dragInfo); @interface NSMiniWindowView : NSView { - NSCell *imageCell; - NSCell *titleCell; + NSCell *imageCell; + NSTextFieldCell *titleCell; } - (void) setImage: (NSImage*)anImage; - (void) setTitle: (NSString*)aString; @end -static NSCell* tileCell = nil; +static NSCell *tileCell = nil; @implementation NSMiniWindowView @@ -229,7 +230,7 @@ static NSCell* tileCell = nil; { [tileCell drawWithFrame: NSMakeRect(0,0,64,64) inView: self]; [imageCell drawWithFrame: NSMakeRect(8,8,48,48) inView: self]; - [titleCell drawWithFrame: NSMakeRect(0,56,64,8) inView: self]; + [titleCell drawWithFrame: NSMakeRect(1,52,62,11) inView: self]; } - (void) mouseDown: (NSEvent*)theEvent @@ -310,8 +311,14 @@ static NSCell* tileCell = nil; { if (titleCell == nil) { - titleCell = [[NSCell alloc] initTextCell: aString]; + titleCell = [[NSTextFieldCell alloc] initTextCell: aString]; + [titleCell setSelectable: NO]; + [titleCell setEditable: NO]; [titleCell setBordered: NO]; + [titleCell setDrawsBackground: YES]; + [titleCell setBackgroundColor: [NSColor blackColor]]; + [titleCell setTextColor: [NSColor whiteColor]]; + [titleCell setFont: [NSFont systemFontOfSize: 8]]; } else {