From: Richard K. <ric...@us...> - 2005-05-20 20:36:31
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24620 Modified Files: ASTheme.as ASThemeProtocol.as NSButtonCell.as Log Message: added shadowless bezel style Index: ASThemeProtocol.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASThemeProtocol.as,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ASThemeProtocol.as 18 May 2005 22:08:00 -0000 1.6 --- ASThemeProtocol.as 20 May 2005 20:36:21 -0000 1.7 *************** *** 53,67 **** * Draws a NSButton in the up state bezeled with the supplied rect in the view. */ ! public function drawBezelButtonUpWithRectInView(rect:NSRect, view:NSView); /** * Draws a NSButton in the down state bezeled with the supplied rect in the view. */ ! public function drawBezelButtonDownWithRectInView(rect:NSRect, view:NSView); /** * Draws a NSButton in the disabled state bezeled with the supplied rect in the view. */ ! public function drawBezelButtonDisabledWithRectInView(rect:NSRect, view:NSView); /** --- 53,67 ---- * Draws a NSButton in the up state bezeled with the supplied rect in the view. */ ! public function drawBezelButtonUpWithRectInViewHasShadow(rect:NSRect, view:NSView, hasShadow:Boolean); /** * Draws a NSButton in the down state bezeled with the supplied rect in the view. */ ! public function drawBezelButtonDownWithRectInViewHasShadow(rect:NSRect, view:NSView, hasShadow:Boolean); /** * Draws a NSButton in the disabled state bezeled with the supplied rect in the view. */ ! public function drawBezelButtonDisabledWithRectInViewHasShadow(rect:NSRect, view:NSView, hasShadow:Boolean); /** Index: NSButtonCell.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSButtonCell.as,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** NSButtonCell.as 18 May 2005 22:06:55 -0000 1.16 --- NSButtonCell.as 20 May 2005 20:36:21 -0000 1.17 *************** *** 85,89 **** m_keyEquivalent = ""; m_alternateTitle = ""; ! m_bcellTransparent = false; } --- 85,90 ---- m_keyEquivalent = ""; m_alternateTitle = ""; ! m_bcellTransparent = false; ! m_bezelStyle = NSBezelStyle.NSRegularSquareBezelStyle; } *************** *** 617,626 **** if (m_enabled) { if (m_highlighted) { ! ASTheme.current().drawBezelButtonDownWithRectInView(cellFrame, inView); } else { ! ASTheme.current().drawBezelButtonUpWithRectInView(cellFrame, inView); } } else { ! ASTheme.current().drawBezelButtonDisabledWithRectInView(cellFrame, inView); } --- 618,627 ---- if (m_enabled) { if (m_highlighted) { ! ASTheme.current().drawBezelButtonDownWithRectInViewHasShadow(cellFrame, inView, m_bezelStyle != NSBezelStyle.NSShadowlessSquareBezelStyle); } else { ! ASTheme.current().drawBezelButtonUpWithRectInViewHasShadow(cellFrame, inView, m_bezelStyle != NSBezelStyle.NSShadowlessSquareBezelStyle); } } else { ! ASTheme.current().drawBezelButtonDisabledWithRectInViewHasShadow(cellFrame, inView, m_bezelStyle != NSBezelStyle.NSShadowlessSquareBezelStyle); } Index: ASTheme.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASTheme.as,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ASTheme.as 20 May 2005 19:59:09 -0000 1.7 --- ASTheme.as 20 May 2005 20:36:21 -0000 1.8 *************** *** 84,97 **** } ! public function drawBezelButtonUpWithRectInView(rect:NSRect, view:NSView) { ! drawButtonUp(view.mcBounds(), rect); } ! public function drawBezelButtonDownWithRectInView(rect:NSRect, view:NSView) { ! drawButtonDown(view.mcBounds(), rect); } ! public function drawBezelButtonDisabledWithRectInView(rect:NSRect, view:NSView) { ! drawButtonDown(view.mcBounds(), rect); } --- 84,109 ---- } ! public function drawBezelButtonUpWithRectInViewHasShadow(rect:NSRect, view:NSView, hasShadow:Boolean) { ! if (hasShadow) { ! drawButtonUp(view.mcBounds(), rect); ! } else { ! drawButtonUpWithoutBorder(view.mcBounds(), rect); ! } } ! public function drawBezelButtonDownWithRectInViewHasShadow(rect:NSRect, view:NSView, hasShadow:Boolean) { ! if (hasShadow) { ! drawButtonDown(view.mcBounds(), rect); ! } else { ! drawButtonDownWithoutBorder(view.mcBounds(), rect); ! } } ! public function drawBezelButtonDisabledWithRectInViewHasShadow(rect:NSRect, view:NSView, hasShadow:Boolean) { ! if (hasShadow) { ! drawButtonDown(view.mcBounds(), rect); ! } else { ! drawButtonDownWithoutBorder(view.mcBounds(), rect); ! } } |