Pārlūkot izejas kodu

More margin fixes.

Mark Sibly 8 gadi atpakaļ
vecāks
revīzija
d909fd8991
2 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 2 0
      modules/mojo/app/style.monkey2
  2. 5 5
      modules/mojo/app/view.monkey2

+ 2 - 0
modules/mojo/app/style.monkey2

@@ -237,6 +237,8 @@ Class Style
 	#rem monkeydoc @hidden 
 	#end
 	Method Render( canvas:Canvas,bounds:Recti )
+	
+		bounds-=_margin
 
 		Local border:=Border
 		Local bdcolor:=BorderColor

+ 5 - 5
modules/mojo/app/view.monkey2

@@ -509,9 +509,11 @@ Class View
 	Method SendMouseEvent( event:MouseEvent )
 	
 		If _acceptsMouseEvents
-
-			OnMouseEvent( event.TransformToView( Self ) )
+		
+			event=event.TransformToView( Self )
 			
+			OnMouseEvent( event )
+		
 			If event.Eaten Return
 		Endif
 		
@@ -698,11 +700,9 @@ Class View
 		
 		If _parent _rmatrix=_parent._rmatrix * _matrix Else _rmatrix=_matrix
 		
-		_bounds-=_rstyle.Margin
-		
 		_rclip=TransformRecti( _rect,_rmatrix )
 		
-		_rbounds=TransformRecti( _bounds,_rmatrix )
+		_rbounds=TransformRecti( _bounds-_rstyle.Margin,_rmatrix )
 		
 		If _parent
 			_rclip&=_parent._rclip