Skip to content

Commit

Permalink
Merge linter into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Alicia363 committed Jul 12, 2024
2 parents c1aec55 + 962de93 commit f820c9a
Show file tree
Hide file tree
Showing 12 changed files with 187 additions and 87 deletions.
4 changes: 2 additions & 2 deletions src/SqueakWhiteboard-Core/WBArrowhead.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Class {

{
#category : #defaults,
#'squeak_changestamp' : 'is 6/23/2024 01:28'
#'squeak_changestamp' : 'ACL 7/12/2024 11:55'
}
WBArrowhead class >> defaultVertices [

^ {0@0. 20@10. 0@20}
^ {0 @ 0. 20 @ 10. 0 @ 20}
]

{
Expand Down
20 changes: 10 additions & 10 deletions src/SqueakWhiteboard-Core/WBButton.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ WBButton >> currentMouseEvent: anEvent [
currentMouseEvent := anEvent
]

{
#category : #accessing,
#'squeak_changestamp' : 'ACL 7/12/2024 12:12'
}
WBButton >> defaultMargin [

^ margin

]

{
#category : #'event handling',
#'squeak_changestamp' : 'is 5/19/2024 16:21'
Expand Down Expand Up @@ -193,16 +203,6 @@ WBButton >> initialize [
self setLayout
]

{
#category : #accessing,
#'squeak_changestamp' : 'si 6/14/2024 12:51'
}
WBButton >> margin [

^ margin

]

{
#category : #accessing,
#'squeak_changestamp' : 'is 6/23/2024 01:16'
Expand Down
13 changes: 11 additions & 2 deletions src/SqueakWhiteboard-Core/WBCanvas.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ WBCanvas class >> defaultGlobalColor [
^ Color cyan
]

{
#category : #accessing,
#'squeak_changestamp' : 'ACL 7/12/2024 11:56'
}
WBCanvas class >> defaultPointSize [

^ 25
]

{
#category : #accessing,
#'squeak_changestamp' : 'si 7/11/2024 17:32'
Expand Down Expand Up @@ -371,14 +380,14 @@ WBCanvas >> setLayout [

{
#category : #'show text',
#'squeak_changestamp' : 'si 7/10/2024 17:30'
#'squeak_changestamp' : 'ACL 7/12/2024 11:56'
}
WBCanvas >> showText: aString [

self text ifNotNil: [self text abandon].
self text: (TextMorph new
contents: aString;
fontName: #Calibri pointSize: 25;
fontName: #Calibri pointSize: self class defaultPointSize;
lock;
yourself).
self addMorph: text.
Expand Down
41 changes: 34 additions & 7 deletions src/SqueakWhiteboard-Core/WBEdgeOfLine.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@ Class {
#'squeak_changestamp' : 'is 6/23/2024 02:19'
}

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 11:57'
}
WBEdgeOfLine class >> defaultCornerRadius [

^100
]

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 11:57'
}
WBEdgeOfLine class >> defaultHeight [

^10
]

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 11:57'
}
WBEdgeOfLine class >> defaultWidth [

^10
]

{
#category : #resize,
#'squeak_changestamp' : 'ACL 7/10/2024 12:08'
Expand Down Expand Up @@ -116,16 +143,16 @@ WBEdgeOfLine >> handlesMouseOver: anEvent [

{
#category : #initialization,
#'squeak_changestamp' : 'si 6/20/2024 23:26'
#'squeak_changestamp' : 'ACL 7/12/2024 11:58'
}
WBEdgeOfLine >> initialize [

super initialize.
self
cornerStyle: #rounded;
cornerRadius: 100;
width: 10;
height: 10;
cornerRadius: self class defaultCornerRadius;
width: self class defaultWidth;
height: self class defaultHeight;
color: Color black;
supportsText: false
]
Expand Down Expand Up @@ -232,12 +259,12 @@ WBEdgeOfLine >> setupEventHandling [

{
#category : #geometry,
#'squeak_changestamp' : 'si 6/21/2024 00:24'
#'squeak_changestamp' : 'ACL 7/12/2024 11:58'
}
WBEdgeOfLine >> switchDirection [

self line switchDirection.
self canvas deactivateElement.
(self line edges at: 2) showPopUp.
self canvas activeElement: (self line edges at: 2)
(self line edges second) showPopUp.
self canvas activeElement: (self line edges second)
]
51 changes: 39 additions & 12 deletions src/SqueakWhiteboard-Core/WBElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,43 @@ Class {
}

{
#category : #layout,
#'squeak_changestamp' : 'is 6/18/2024 22:28'
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 12:03'
}
WBElement class >> defaultBorderWidth [

^ 3
]

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 12:00'
}
WBElement class >> defaultButtonColumns [

^ 3
]

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 12:21'
}
WBElement class >> defaultImageSizeFactor [

^ 0.75
]

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 12:04'
}
WBElement class >> defaultSize [

^ 100@100
^ 100 @ 100
]

{
#category : #layout,
#category : #defaults,
#'squeak_changestamp' : 'si 7/10/2024 13:36'
}
WBElement class >> defaultTextBorderOffset [
Expand Down Expand Up @@ -208,11 +235,11 @@ WBElement >> buttonFunctionalityForBorderColor [

{
#category : #'button functionalities',
#'squeak_changestamp' : 'si 7/10/2024 17:04'
#'squeak_changestamp' : 'ACL 7/12/2024 12:00'
}
WBElement >> buttonFunctionalityForBorderColorPalette [

^ [:aButton | self popUp tryToMakePopUpAt: aButton topCenter - (0 @ (self class sizeOfPopUpForStandardElement / 2)) with: self makeBorderColorButtons columns: 3]
^ [:aButton | self popUp tryToMakePopUpAt: aButton topCenter - (0 @ (self class sizeOfPopUpForStandardElement / 2)) with: self makeBorderColorButtons columns: self class defaultButtonColumns]
]

{
Expand All @@ -227,11 +254,11 @@ WBElement >> buttonFunctionalityForColor [

{
#category : #'button functionalities',
#'squeak_changestamp' : 'si 7/10/2024 17:04'
#'squeak_changestamp' : 'ACL 7/12/2024 12:00'
}
WBElement >> buttonFunctionalityForColorPalette [

^ [:aButton | self popUp tryToMakePopUpAt: aButton topCenter - (0 @ (self class sizeOfPopUpForStandardElement / 2)) with: self makeColorButtons columns: 3]
^ [:aButton | self popUp tryToMakePopUpAt: aButton topCenter - (0 @ (self class sizeOfPopUpForStandardElement / 2)) with: self makeColorButtons columns: self class defaultButtonColumns]
]

{
Expand Down Expand Up @@ -506,11 +533,11 @@ WBElement >> height: aHeight [

{
#category : #appearance,
#'squeak_changestamp' : 'si 7/10/2024 11:57'
#'squeak_changestamp' : 'ACL 7/12/2024 12:21'
}
WBElement >> imageSize [

^ (self class sizeOfPopUpForStandardElement @ self class sizeOfPopUpForStandardElement) * 0.75
^ (self class sizeOfPopUpForStandardElement @ self class sizeOfPopUpForStandardElement) * self class defaultImageSizeFactor
]

{
Expand Down Expand Up @@ -897,13 +924,13 @@ WBElement >> right [

{
#category : #layout,
#'squeak_changestamp' : 'si 7/12/2024 11:38'
#'squeak_changestamp' : 'ACL 7/12/2024 12:30'
}
WBElement >> setLayout [

self
extent: self class defaultSize;
borderWidth: 3;
borderWidth: self class defaultBorderWidth;
borderColor: self canvas globalColor.
self canvas globalColor = Color transparent
ifTrue:
Expand Down
19 changes: 14 additions & 5 deletions src/SqueakWhiteboard-Core/WBLine.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ Class {
#'squeak_changestamp' : 'is 6/23/2024 02:19'
}

{
#category : #defaults,
#'squeak_changestamp' : 'ACL 7/12/2024 12:05'
}
WBLine class >> defaultBorderWidth [

^ 2
]

{
#category : #'event handeling',
#'squeak_changestamp' : 'si 7/11/2024 15:10'
#'squeak_changestamp' : 'ACL 7/12/2024 12:05'
}
WBLine >> activateElement: anEvent [

Expand All @@ -25,8 +34,8 @@ WBLine >> activateElement: anEvent [
deactivateElement;
deactivateTextbox.
self dragStart: anEvent.
(self edges at: 2) showPopUp.
self canvas activeElement: (self edges at: 2)]
(self edges second) showPopUp.
self canvas activeElement: (self edges second)]
]

{
Expand Down Expand Up @@ -238,12 +247,12 @@ WBLine >> mouseUp: anEvent [

{
#category : #layout,
#'squeak_changestamp' : 'si 7/11/2024 15:20'
#'squeak_changestamp' : 'ACL 7/12/2024 12:05'
}
WBLine >> setCreatedLayout [

self
borderWidth: 2;
borderWidth: self class defaultBorderWidth;
color: Color black;
checkForArrowHead.
]
Expand Down
8 changes: 4 additions & 4 deletions src/SqueakWhiteboard-Core/WBNote.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Class {

{
#category : #accessing,
#'squeak_changestamp' : 'is 6/23/2024 01:46'
#'squeak_changestamp' : 'ACL 7/12/2024 12:08'
}
WBNote class >> defaultSizeOfCorner [

^ 20@20
^ 20 @ 20
]

{
Expand All @@ -33,14 +33,14 @@ WBNote >> color: aColor [

{
#category : #initialization,
#'squeak_changestamp' : 'is 6/23/2024 01:42'
#'squeak_changestamp' : 'ACL 7/12/2024 12:07'
}
WBNote >> createVertecies [

self edges removeAll.
self edges
add: self center - (self sizeOfNote/2);
add: self center + (((self sizeOfNote x / 2) - self sizeOfCorner y) @ (-1* (self sizeOfNote y/ 2)));
add: self center + (((self sizeOfNote x / 2) - self sizeOfCorner y) @ (-1* (self sizeOfNote y / 2)));
add: self center + ((self sizeOfNote x / 2) @ (-1 * ((self sizeOfNote y / 2) - self sizeOfCorner y)));
add: self center + (((self sizeOfNote x / 2) - self sizeOfCorner x) @ (-1 * ((self sizeOfNote y / 2) - self sizeOfCorner y)));
add: self center + (((self sizeOfNote x / 2) - self sizeOfCorner x) @ (-1* (self sizeOfNote y / 2)));
Expand Down
16 changes: 8 additions & 8 deletions src/SqueakWhiteboard-Core/WBPopUp.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ WBPopUp class >> cornerRadius [

{
#category : #size,
#'squeak_changestamp' : 'si 7/11/2024 14:55'
#'squeak_changestamp' : 'ACL 7/12/2024 12:12'
}
WBPopUp class >> defaultSizeOfPopUp [
WBPopUp class >> defaultMargin [

^ 20
^ 5
]

{
#category : #size,
#'squeak_changestamp' : 'si 7/10/2024 12:10'
#'squeak_changestamp' : 'si 7/11/2024 14:55'
}
WBPopUp class >> margin [
WBPopUp class >> defaultSizeOfPopUp [

^ 5
^ 20
]

{
Expand Down Expand Up @@ -211,11 +211,11 @@ WBPopUp >> setLayout [

{
#category : #accessing,
#'squeak_changestamp' : 'si 7/10/2024 11:40'
#'squeak_changestamp' : 'ACL 7/12/2024 12:12'
}
WBPopUp >> sizeOfButton [

^ (self sizeOfPopUp - self class margin) @ (self sizeOfPopUp - self class margin)
^ (self sizeOfPopUp - self class defaultMargin) @ (self sizeOfPopUp - self class defaultMargin)
]

{
Expand Down
Loading

0 comments on commit f820c9a

Please sign in to comment.