Skip to content

Commit

Permalink
fixed ToLAFButtonDresser
Browse files Browse the repository at this point in the history
  • Loading branch information
plantec committed Jul 1, 2023
1 parent 495211f commit 9f65b21
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 113 deletions.
59 changes: 0 additions & 59 deletions src/Toplo-LookAndFeel/BlElement.extension.st

This file was deleted.

50 changes: 0 additions & 50 deletions src/Toplo-LookAndFeel/OBlSpace.extension.st

This file was deleted.

8 changes: 7 additions & 1 deletion src/Toplo-LookAndFeel/ToLAFButtonDresser.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Class {
#name : #ToLAFButtonDresser,
#superclass : #ToAbstractButtonDresser,
#superclass : #ToGeneralButtonDresser,
#traits : 'TToSkinnableElementDresser',
#classTraits : 'TToSkinnableElementDresser classTrait',
#category : #'Toplo-LookAndFeel-Dressers'
Expand Down Expand Up @@ -92,6 +92,12 @@ ToLAFButtonDresser >> leftPressed: anElement event: anEvent [
(image notNil and:[image dresser notNil]) ifTrue:[ image dresser leftPressed: image event: anEvent ].
]

{ #category : #'events handling' }
ToLAFButtonDresser >> leftUp: anElement event: anEvent [

self hover: anElement event: anEvent
]

{ #category : #'api - install/uninstall hook' }
ToLAFButtonDresser >> onInstalledIn: anElement [

Expand Down
2 changes: 1 addition & 1 deletion src/Toplo/ToAbstractButtonDresser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ToAbstractButtonDresser >> up: anElement event: anEvent [
super up: anElement event: anEvent.
"mouse up must be consumed here so that BlClickCandidateEvent is created
with the right BlMouseUpEvent"
anEvent consumed: true.
anEvent primaryButtonPressed ifFalse: [ ^ self ].
anEvent consumed: true.

]
1 change: 1 addition & 0 deletions src/Toplo/ToGeneralButtonDresser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ToGeneralButtonDresser >> installEventListenersIn: anElement [
{ #category : #'events handling' }
ToGeneralButtonDresser >> leaved: anElement event: anEvent [

super leaved: anElement event: anEvent.
self border: initialBorder in: anElement.
self background: initialBackground in: anElement

Expand Down
2 changes: 1 addition & 1 deletion src/Toplo/ToSandBox.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,7 @@ ToSandBox class >> example_toButtonWithIconAndText [
yourself.
but icon: iconImage.
but padding: (BlInsets all: 4).
but when: BlClickEvent do: [ :event | event currentTarget traceCr ].
but when: BlPrimaryClickEvent do: [ :event | event currentTarget traceCr ].

space := OBlSpace new.
space root addChild: but.
Expand Down
2 changes: 1 addition & 1 deletion src/Toplo/ToWidgetWindowElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ToWidgetWindowElement >> animate: aBoolean [
{ #category : #accessing }
ToWidgetWindowElement >> autoCloseOnMouseUpDelay [

^ 250 milliSeconds
^ 300 milliSeconds
]

{ #category : #'api - displaying' }
Expand Down

0 comments on commit 9f65b21

Please sign in to comment.