diff --git a/ChangeLog b/ChangeLog index 532424138..45fd1eb29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-12 00:47 Alexander Malmberg + + * Source/GSStandardWindowDecorationView.m (-initWithFrame:window:): + Create a paragraph style with line-breaking-by-clipping and use it + for window titles. + 2005-01-12 00:41 Alexander Malmberg * Printing/GSCUPS/GSCUPSPrinter.h (GSCUPSDummyPrinterName): New diff --git a/Source/GSStandardWindowDecorationView.m b/Source/GSStandardWindowDecorationView.m index 6ade72366..4b11b1df6 100644 --- a/Source/GSStandardWindowDecorationView.m +++ b/Source/GSStandardWindowDecorationView.m @@ -30,6 +30,7 @@ #include "AppKit/NSApplication.h" #include "AppKit/NSButton.h" #include "AppKit/NSImage.h" +#include "AppKit/NSParagraphStyle.h" #include "AppKit/NSScreen.h" #include "AppKit/NSStringDrawing.h" #include "AppKit/NSWindow.h" @@ -117,20 +118,28 @@ static NSColor *titleColor[3]; { if (!titleTextAttributes[0]) { + NSMutableParagraphStyle *p; + + p = [NSMutableParagraphStyle defaultParagraphStyle]; + [p setLineBreakMode: NSLineBreakByClipping]; + titleTextAttributes[0] = [[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSFont titleBarFontOfSize: 0], NSFontAttributeName, [NSColor windowFrameTextColor], NSForegroundColorAttributeName, + p, NSParagraphStyleAttributeName, nil]; titleTextAttributes[1] = [[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSFont titleBarFontOfSize: 0], NSFontAttributeName, [NSColor blackColor], NSForegroundColorAttributeName, /* TODO: need a named color for this */ + p, NSParagraphStyleAttributeName, nil]; titleTextAttributes[2] = [[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSFont titleBarFontOfSize: 0], NSFontAttributeName, [NSColor windowFrameTextColor], NSForegroundColorAttributeName, + p, NSParagraphStyleAttributeName, nil]; titleColor[0] = RETAIN([NSColor windowFrameColor]);