mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
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:
parent
b5c97f812c
commit
9d8f15a603
2 changed files with 15 additions and 0 deletions
|
@ -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>
|
2005-01-12 00:41 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Printing/GSCUPS/GSCUPSPrinter.h (GSCUPSDummyPrinterName): New
|
* Printing/GSCUPS/GSCUPSPrinter.h (GSCUPSDummyPrinterName): New
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "AppKit/NSApplication.h"
|
#include "AppKit/NSApplication.h"
|
||||||
#include "AppKit/NSButton.h"
|
#include "AppKit/NSButton.h"
|
||||||
#include "AppKit/NSImage.h"
|
#include "AppKit/NSImage.h"
|
||||||
|
#include "AppKit/NSParagraphStyle.h"
|
||||||
#include "AppKit/NSScreen.h"
|
#include "AppKit/NSScreen.h"
|
||||||
#include "AppKit/NSStringDrawing.h"
|
#include "AppKit/NSStringDrawing.h"
|
||||||
#include "AppKit/NSWindow.h"
|
#include "AppKit/NSWindow.h"
|
||||||
|
@ -117,20 +118,28 @@ static NSColor *titleColor[3];
|
||||||
{
|
{
|
||||||
if (!titleTextAttributes[0])
|
if (!titleTextAttributes[0])
|
||||||
{
|
{
|
||||||
|
NSMutableParagraphStyle *p;
|
||||||
|
|
||||||
|
p = [NSMutableParagraphStyle defaultParagraphStyle];
|
||||||
|
[p setLineBreakMode: NSLineBreakByClipping];
|
||||||
|
|
||||||
titleTextAttributes[0] = [[NSMutableDictionary alloc]
|
titleTextAttributes[0] = [[NSMutableDictionary alloc]
|
||||||
initWithObjectsAndKeys:
|
initWithObjectsAndKeys:
|
||||||
[NSFont titleBarFontOfSize: 0], NSFontAttributeName,
|
[NSFont titleBarFontOfSize: 0], NSFontAttributeName,
|
||||||
[NSColor windowFrameTextColor], NSForegroundColorAttributeName,
|
[NSColor windowFrameTextColor], NSForegroundColorAttributeName,
|
||||||
|
p, NSParagraphStyleAttributeName,
|
||||||
nil];
|
nil];
|
||||||
titleTextAttributes[1] = [[NSMutableDictionary alloc]
|
titleTextAttributes[1] = [[NSMutableDictionary alloc]
|
||||||
initWithObjectsAndKeys:
|
initWithObjectsAndKeys:
|
||||||
[NSFont titleBarFontOfSize: 0], NSFontAttributeName,
|
[NSFont titleBarFontOfSize: 0], NSFontAttributeName,
|
||||||
[NSColor blackColor], NSForegroundColorAttributeName, /* TODO: need a named color for this */
|
[NSColor blackColor], NSForegroundColorAttributeName, /* TODO: need a named color for this */
|
||||||
|
p, NSParagraphStyleAttributeName,
|
||||||
nil];
|
nil];
|
||||||
titleTextAttributes[2] = [[NSMutableDictionary alloc]
|
titleTextAttributes[2] = [[NSMutableDictionary alloc]
|
||||||
initWithObjectsAndKeys:
|
initWithObjectsAndKeys:
|
||||||
[NSFont titleBarFontOfSize: 0], NSFontAttributeName,
|
[NSFont titleBarFontOfSize: 0], NSFontAttributeName,
|
||||||
[NSColor windowFrameTextColor], NSForegroundColorAttributeName,
|
[NSColor windowFrameTextColor], NSForegroundColorAttributeName,
|
||||||
|
p, NSParagraphStyleAttributeName,
|
||||||
nil];
|
nil];
|
||||||
|
|
||||||
titleColor[0] = RETAIN([NSColor windowFrameColor]);
|
titleColor[0] = RETAIN([NSColor windowFrameColor]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue