Skip to content

Commit

Permalink
Merge origin/main into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Alicia363 committed Jul 10, 2024
2 parents a88a90e + 0e44d45 commit 6968978
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 27 deletions.
8 changes: 4 additions & 4 deletions src/SqueakWhiteboard-Core/WBElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ WBElement >> extent [

{
#category : #'morph functionalities',
#'squeak_changestamp' : 'JK 6/25/2024 15:43'
#'squeak_changestamp' : 'nicloeser 7/10/2024 11:58'
}
WBElement >> extent: anExtent [

self morph extent: anExtent.
textField ifNotNil: [textField extent: anExtent - self textBorderOffset].
self textField ifNotNil: [self textField extent: anExtent - self textBorderOffset].
self popUp ifNotNil: [self setPopupPosition]


Expand Down Expand Up @@ -783,11 +783,11 @@ WBElement >> position: aPosition [

{
#category : #'event handling',
#'squeak_changestamp' : 'is 6/25/2024 16:17'
#'squeak_changestamp' : 'nicloeser 7/10/2024 11:59'
}
WBElement >> postDropRoutine: anEvent [

supportsText ifTrue: [self activateTextbox: anEvent]
self supportsText ifTrue: [self activateTextbox: anEvent]
]

{
Expand Down
4 changes: 2 additions & 2 deletions src/SqueakWhiteboard-Core/WBLine.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ WBLine >> checkForArrowHead [

{
#category : #accessing,
#'squeak_changestamp' : 'is 6/18/2024 00:04'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:00'
}
WBLine >> color: aColor [

self borderColor: aColor.
(arrowHead class = WBArrowhead) ifTrue:
(self arrowHead class = WBArrowhead) ifTrue:
[self arrowHead
color: aColor;
borderColor: aColor].
Expand Down
7 changes: 3 additions & 4 deletions src/SqueakWhiteboard-Core/WBLineHitbox.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ Class {

{
#category : #'event handling',
#'squeak_changestamp' : 'si 7/7/2024 15:12'
#'squeak_changestamp' : 'nicloeser 7/10/2024 11:47'
}
WBLineHitbox >> containsPoint: aPoint [
"Extend the bounds to include the border area"

^ self isClickNearLine: aPoint
]
Expand Down Expand Up @@ -48,11 +47,11 @@ WBLineHitbox >> initialize [

{
#category : #'event handling',
#'squeak_changestamp' : 'si 7/7/2024 15:11'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:00'
}
WBLineHitbox >> isClickNearLine: aPoint [

^ self point: aPoint isNearLineFrom: (self vertices at: 1) to: (self vertices at: 2) within: borderWidth / 2
^ self point: aPoint isNearLineFrom: (self vertices at: 1) to: (self vertices at: 2) within: self borderWidth / 2
]

{
Expand Down
4 changes: 2 additions & 2 deletions src/SqueakWhiteboard-Core/WBPluggableTextMorphPlus.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ WBPluggableTextMorphPlus >> handlesMouseOver: anEvent [

{
#category : #styling,
#'squeak_changestamp' : 'is 6/22/2024 00:20'
#'squeak_changestamp' : 'nicloeser 7/10/2024 11:48'
}
WBPluggableTextMorphPlus >> hasUnacceptedEdits: aBoolean [
"overwrite hasUnacceptedEdits so that orange triangle doesn't appear"
"overwrite hasUnacceptedEdits so that orange triangle doesn't appear"

hasUnacceptedEdits := false

Expand Down
4 changes: 2 additions & 2 deletions src/SqueakWhiteboard-Core/WBResizeBar.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ WBResizeBar >> resizeCursor [

{
#category : #sizing,
#'squeak_changestamp' : 'JK 6/30/2024 21:20'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:00'
}
WBResizeBar >> setLayout [

self center: frame position
self center: self frame position
]
8 changes: 4 additions & 4 deletions src/SqueakWhiteboard-Core/WBResizeFrame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ WBResizeFrame >> handles: anObject [

{
#category : #initialization,
#'squeak_changestamp' : 'is 6/23/2024 01:57'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:00'
}
WBResizeFrame >> initializeWithParent: aMorph [

super initialize.
self
element: aMorph;
bounds: element bounds;
bounds: self element bounds;
color: Color transparent;
borderColor: Color gray;
borderWidth: 1;
Expand All @@ -128,12 +128,12 @@ WBResizeFrame >> initializeWithParent: aMorph [

{
#category : #resize,
#'squeak_changestamp' : 'is 6/23/2024 01:57'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:01'
}
WBResizeFrame >> position: aPosition [

self element position: aPosition.
super position: element position.
super position: self element position.
self positionHandles
]

Expand Down
9 changes: 4 additions & 5 deletions src/SqueakWhiteboard-Core/WBTextMorphForEditView.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ WBTextMorphForEditView >> handlesMouseDown: anEvent [

{
#category : #'event handling',
#'squeak_changestamp' : 'ACL 7/10/2024 12:11'
#'squeak_changestamp' : 'ACL 7/10/2024 12:15'
}
WBTextMorphForEditView >> keyStroke: anEvent [
"When esc is pressed, the focus from the textfield should be removed"
| char |
| char |

((char := anEvent keyCharacter) = Character escape) ifTrue:
[self editView element canvas deactivateTextbox].
Expand All @@ -41,12 +40,12 @@ WBTextMorphForEditView >> keyStroke: anEvent [

{
#category : #initialization,
#'squeak_changestamp' : 'is 6/25/2024 16:28'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:03'
}
WBTextMorphForEditView >> setDefaultContentsIfNil [
| toUse |

text ifNil:
self text ifNil:
[toUse := self valueOfProperty: #defaultContents.
toUse ifNil: [toUse :='' asText].
text := toUse]
Expand Down
8 changes: 4 additions & 4 deletions src/SqueakWhiteboard-Core/WBToolbar.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -531,15 +531,15 @@ WBToolbar >> makePopUpAt: aPoint with: aCollection columns: aNumber [

{
#category : #initialization,
#'squeak_changestamp' : 'is 6/23/2024 02:06'
#'squeak_changestamp' : 'nicloeser 7/10/2024 11:45'
}
WBToolbar >> placeButtons: someButtons [

someButtons doWithIndex: [:aButton :anIndex|
aButton
margin: WBToolbar margin;
extent: self buttonSize;
center: (self bounds origin x + self toolbarWidth/2)@(self bounds origin y + ((self buttonSize y + WBToolbar margin) * anIndex) ) - (0@self buttonSize y/2);
center: (self bounds origin x + self toolbarWidth / 2) @ (self bounds origin y + ((self buttonSize y + WBToolbar margin) * anIndex) ) - (0 @ self buttonSize y / 2);
addImage.
self addMorph: aButton].
self buttons: someButtons
Expand All @@ -566,14 +566,14 @@ WBToolbar >> popUp: aPopUp [

{
#category : #layout,
#'squeak_changestamp' : 'is 6/23/2024 02:07'
#'squeak_changestamp' : 'nicloeser 7/10/2024 12:04'
}
WBToolbar >> setLayout [

self
toolbarHeight: self canvas extent y * self toolbarCanvasSizeFactor y;
toolbarWidth: self canvas extent x * self toolbarCanvasSizeFactor x;
center: (canvas bounds origin x + self extent x / 2) @ (canvas bounds origin y + ((canvas bounds corner y - canvas bounds origin y))/2);
center: (self canvas bounds origin x + self extent x / 2) @ (self canvas bounds origin y + ((self canvas bounds corner y - self canvas bounds origin y))/2);
updateColor

]
Expand Down

0 comments on commit 6968978

Please sign in to comment.