From: Richard K. <ric...@us...> - 2005-06-29 07:00:27
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6981 Modified Files: NSBox.as Log Message: added support for the title spacing and a groove box Index: NSBox.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSBox.as,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NSBox.as 10 Jun 2005 06:56:12 -0000 1.8 --- NSBox.as 29 Jun 2005 07:00:19 -0000 1.9 *************** *** 375,379 **** var txtSize:NSSize = titleFont().getTextExtent(title()); // Get the text size. ! var txtLoc:NSPoint = new NSPoint(10, 0); var bdrRect:NSRect = m_bounds.clone(); var cntRect:NSRect = m_bounds.clone(); --- 375,380 ---- var txtSize:NSSize = titleFont().getTextExtent(title()); // Get the text size. ! txtSize.width+=1; ! var txtLoc:NSPoint = new NSPoint((m_bounds.size.width - txtSize.width)/2, 0); var bdrRect:NSRect = m_bounds.clone(); var cntRect:NSRect = m_bounds.clone(); *************** *** 477,489 **** case NSBorderType.NSLineBorder: ! ASDraw.outlineRectWithRect(m_mcBounds, aRect, [0]); break; case NSBorderType.NSBezelBorder: ! ASDraw.outlineRectWithRect(m_mcBounds, aRect, [0]); break; case NSBorderType.NSGrooveBorder: ! ASDraw.outlineRectWithRect(m_mcBounds, aRect, [0]); break; --- 478,506 ---- case NSBorderType.NSLineBorder: ! if (excludeRect != undefined) { ! ASDraw.outlineRectWithRectExcludingRect(m_mcBounds, aRect, excludeRect, [0]); ! } else { ! ASDraw.outlineRectWithRect(m_mcBounds, aRect, [0]); ! } break; case NSBorderType.NSBezelBorder: ! if (excludeRect != undefined) { ! ASDraw.outlineRectWithRectExcludingRect(m_mcBounds, aRect, excludeRect, [0]); ! } else { ! ASDraw.outlineRectWithRect(m_mcBounds, aRect, [0]); ! } break; case NSBorderType.NSGrooveBorder: ! if (excludeRect != undefined) { ! ASDraw.outlineRectWithRectExcludingRect(m_mcBounds, aRect, excludeRect, [0xDDDDDD]); ! ASDraw.outlineRectWithRectExcludingRect(m_mcBounds, new NSRect(aRect.origin.x+1, aRect.origin.y+1, aRect.size.width, aRect.size.height), excludeRect, [0xDDDDDD]); ! ASDraw.outlineRectWithRectExcludingRect(m_mcBounds, new NSRect(aRect.origin.x, aRect.origin.y, aRect.size.width-1, aRect.size.height-1), excludeRect, [0x333333]); ! } else { ! ASDraw.outlineRectWithRect(m_mcBounds, aRect, [0xDDDDDD]); ! ASDraw.outlineRectWithRect(m_mcBounds, new NSRect(aRect.origin.x+1, aRect.origin.y+1, aRect.size.width, aRect.size.height), [0xDDDDDD]); ! ASDraw.outlineRectWithRect(m_mcBounds, new NSRect(aRect.origin.x, aRect.origin.y, aRect.size.width-1, aRect.size.height-1), [0x333333]); ! } break; |