mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:00:37 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16154 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
270921f22c
commit
a3580a4caf
2 changed files with 6 additions and 4 deletions
|
@ -1425,6 +1425,7 @@ _addLeftBorderOffsetToRect(NSRect aRect, BOOL isHorizontal)
|
|||
- (void) drawRect: (NSRect)rect
|
||||
{
|
||||
NSRect workRect = [self bounds];
|
||||
NSSize titleSize;
|
||||
NSRectEdge sides[] = {NSMinXEdge, NSMaxYEdge};
|
||||
float grays[] = {NSDarkGray, NSDarkGray};
|
||||
/* Cache the title attributes */
|
||||
|
@ -1454,11 +1455,10 @@ _addLeftBorderOffsetToRect(NSRect aRect, BOOL isHorizontal)
|
|||
nil];
|
||||
}
|
||||
|
||||
// This gives the correct position
|
||||
// WO: No it doesn't!
|
||||
titleSize = [[menu title] sizeWithAttributes: attr];
|
||||
workRect.origin.x += 5;
|
||||
workRect.size.width -= 5;
|
||||
workRect.size.height -= 2;
|
||||
workRect.origin.y = NSMidY (workRect) - titleSize.height / 2;
|
||||
workRect.size.height = titleSize.height;
|
||||
[[menu title] drawInRect: workRect withAttributes: attr];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue