2005-01-12 00:47 Alexander Malmberg <alexander@malmberg.org>

* Source/GSStandardWindowDecorationView.m (-initWithFrame🪟):
	Create a paragraph style with line-breaking-by-clipping and use it
	for window titles.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20543 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2005-01-11 23:43:36 +00:00
parent 05b4dcfa18
commit f008693502
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-01-12 00:47 Alexander Malmberg <alexander@malmberg.org>
* 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 <alexander@malmberg.org>
* Printing/GSCUPS/GSCUPSPrinter.h (GSCUPSDummyPrinterName): New

View file

@ -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]);