Center the title properly.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19808 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-08-01 13:00:29 +00:00
parent bde5299f6d
commit 3b3235003a
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,9 @@
2004-08-31 14:28 Alexander Malmberg <alexander@malmberg.org>
2004-08-01 14:55 Alexander Malmberg <alexander@malmberg.org>
* Source/GSStandardWindowDecorationView.m (-drawTitleBar): Fix
the centering of the title.
2004-08-01 14:28 Alexander Malmberg <alexander@malmberg.org>
* TextConverters/RTF/RTFProducer.m (-_addAttributesString:): Only add
attachmentFileWrapper to the attachments array if it isn't nil.

View file

@ -247,7 +247,7 @@ static const NSRectEdge edges[4] = {NSMinXEdge, NSMaxYEdge,
titleSize = [title sizeWithAttributes: titleTextAttributes[inputState]];
if (titleSize.width <= workRect.size.width)
workRect.origin.x += NSMidX(workRect) - titleSize.width / 2;
workRect.origin.x = NSMidX(workRect) - titleSize.width / 2;
workRect.origin.y = NSMidY(workRect) - titleSize.height / 2;
workRect.size.height = titleSize.height;
[title drawInRect: workRect