diff --git a/Squello-Core.package/SPBCard.class/instance/calculateLabelPositionFor..st b/Squello-Core.package/SPBCard.class/instance/calculateLabelPositionFor..st index 8e76b22c..f2b2ff51 100644 --- a/Squello-Core.package/SPBCard.class/instance/calculateLabelPositionFor..st +++ b/Squello-Core.package/SPBCard.class/instance/calculateLabelPositionFor..st @@ -1,9 +1,12 @@ updating-local calculateLabelPositionFor: aNumber - | label previousLabel | + | label previousLabel firstAttempt | previousLabel := self labelModels at: aNumber - 1. label := self labelModels at: aNumber. + firstAttempt := (previousLabel position x + previousLabel extent x + self labelBorderOffset) @ previousLabel position y. + firstAttempt x + label extent x <= (self extent x - self labelBorderOffset) ifTrue: [^ firstAttempt]. + ^ self labelBorderOffset @ - (previousLabel position y + (previousLabel extent y + self inbetweenLabelOffset)) \ No newline at end of file + (previousLabel position y + (previousLabel extent y + self inbetweenLabelOffset)). \ No newline at end of file diff --git a/Squello-Core.package/SPBCard.class/instance/labelBorderOffset.st b/Squello-Core.package/SPBCard.class/instance/labelBorderOffset.st index 72860385..5ec03b5b 100644 --- a/Squello-Core.package/SPBCard.class/instance/labelBorderOffset.st +++ b/Squello-Core.package/SPBCard.class/instance/labelBorderOffset.st @@ -1,4 +1,4 @@ -accessing +constants labelBorderOffset - ^ 4. \ No newline at end of file + ^ self padding. \ No newline at end of file diff --git a/Squello-Core.package/SPBCard.class/instance/labelTitleOffset.st b/Squello-Core.package/SPBCard.class/instance/labelTitleOffset.st index a07a0381..4d501c1b 100644 --- a/Squello-Core.package/SPBCard.class/instance/labelTitleOffset.st +++ b/Squello-Core.package/SPBCard.class/instance/labelTitleOffset.st @@ -1,4 +1,4 @@ -accessing +constants labelTitleOffset ^ 10. \ No newline at end of file diff --git a/Squello-Core.package/SPBCard.class/instance/setCardHeight.st b/Squello-Core.package/SPBCard.class/instance/setCardHeight.st index 839f9003..c1dae5fc 100644 --- a/Squello-Core.package/SPBCard.class/instance/setCardHeight.st +++ b/Squello-Core.package/SPBCard.class/instance/setCardHeight.st @@ -2,12 +2,8 @@ updating-local setCardHeight | labelHeightsSum | - labelHeightsSum := 0. - self labelModels - do: [:label | labelHeightsSum := labelHeightsSum - + label extent y - + self inbetweenLabelOffset]. + labelHeightsSum := self labelModels size = 0 ifTrue: [0] ifFalse: [self labelModels last position y + self labelModels last extent y - self labelModels first position y]. self extent: self class defaultCardExtent x @ - ((self titleModel extent y + labelHeightsSum + self labelTitleOffset) + ((self titleModel extent y + labelHeightsSum + self labelTitleOffset + self statusModel extent y) max: self class defaultCardExtent y). \ No newline at end of file diff --git a/Squello-Core.package/SPBCard.class/instance/updateLabelIcons.st b/Squello-Core.package/SPBCard.class/instance/updateLabelIcons.st index 1488e206..655e9994 100644 --- a/Squello-Core.package/SPBCard.class/instance/updateLabelIcons.st +++ b/Squello-Core.package/SPBCard.class/instance/updateLabelIcons.st @@ -8,6 +8,7 @@ updateLabelIcons self labels do: [:label | newLabel := label asMorph. self labelModels add: newLabel. - self addMorph: newLabel. - self alignLabels]. + self addMorph: newLabel.]. + + self alignLabels. self column ifNotNil: [self resizeCard. self column resizeToFitCards]. diff --git a/Squello-Core.package/SPBCard.class/methodProperties.json b/Squello-Core.package/SPBCard.class/methodProperties.json index d60c884a..28ea27d1 100644 --- a/Squello-Core.package/SPBCard.class/methodProperties.json +++ b/Squello-Core.package/SPBCard.class/methodProperties.json @@ -33,7 +33,7 @@ "buildStatusText" : "AH 5/25/2024 16:59", "buildTitle" : "AH 6/14/2024 12:14", "buildUI" : "AH 6/16/2024 13:06", - "calculateLabelPositionFor:" : "mcr 8/4/2022 01:35", + "calculateLabelPositionFor:" : "AH 6/20/2024 23:55", "cardIndicatorExtent" : "lo 8/1/2022 11:52", "changeProvider" : "lo 7/8/2022 15:38", "changeProvider:" : "jh 7/9/2022 10:18", @@ -61,7 +61,7 @@ "isRealCard" : "lo 7/31/2022 16:55", "issueId" : "LW 5/24/2022 21:51", "issueId:" : "LW 7/14/2022 10:48", - "labelBorderOffset" : "lo 8/1/2022 11:18", + "labelBorderOffset" : "AH 6/20/2024 23:39", "labelModels" : "tk 8/2/2022 23:28", "labelModels:" : "tk 8/2/2022 23:28", "labelTitleOffset" : "lo 8/1/2022 11:18", @@ -79,7 +79,7 @@ "resizeIndicatorFields" : "tk 8/2/2022 23:23", "setCardColumn:" : "jh 8/3/2022 00:34", "setCardColumnAtTop:" : "jh 8/3/2022 00:33", - "setCardHeight" : "mcr 8/3/2022 23:39", + "setCardHeight" : "AH 6/20/2024 23:54", "setupMouseEvents" : "jh 8/3/2022 00:20", "startDragging" : "mcr 8/3/2022 12:29", "statusModel" : "AH 5/25/2024 16:59", @@ -95,7 +95,7 @@ "updateAssigneeCount" : "tk 8/2/2022 23:27", "updateBalloonText" : "mcr 8/4/2022 01:50", "updateDescription:" : "jh 7/29/2022 11:38", - "updateLabelIcons" : "mcr 8/4/2022 01:51", + "updateLabelIcons" : "AH 6/20/2024 23:31", "updateStatus" : "AH 5/25/2024 17:02", "updateTitle:" : "tk 8/2/2022 23:24", "upperHalfIndicator" : "tk 8/2/2022 23:23", diff --git a/Squello-Core.package/SPBLabel.class/instance/asMorph.st b/Squello-Core.package/SPBLabel.class/instance/asMorph.st index 5cd6ee68..774013af 100644 --- a/Squello-Core.package/SPBLabel.class/instance/asMorph.st +++ b/Squello-Core.package/SPBLabel.class/instance/asMorph.st @@ -1,8 +1,9 @@ converting asMorph - ^ TextMorph new + ^ SPBLabelMorph new backgroundColor: self color; + color: self color makeForegroundColor; contents: self title; extent: 100@21; lock; diff --git a/Squello-Core.package/SPBLabel.class/methodProperties.json b/Squello-Core.package/SPBLabel.class/methodProperties.json index 2a3f37a0..9a4c3aed 100644 --- a/Squello-Core.package/SPBLabel.class/methodProperties.json +++ b/Squello-Core.package/SPBLabel.class/methodProperties.json @@ -5,7 +5,7 @@ "instance" : { "=" : "jh 7/31/2022 13:05", "asForm" : "tk 8/2/2022 23:37", - "asMorph" : "lo 8/1/2022 13:50", + "asMorph" : "AH 6/20/2024 23:45", "asString" : "lo 6/5/2022 14:49", "color" : "lo 5/16/2022 22:01", "color:" : "lo 5/23/2022 16:52", diff --git a/Squello-Core.package/SPBLabelMorph.class/README.md b/Squello-Core.package/SPBLabelMorph.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/Squello-Core.package/SPBLabelMorph.class/instance/applyUserInterfaceTheme.st b/Squello-Core.package/SPBLabelMorph.class/instance/applyUserInterfaceTheme.st new file mode 100644 index 00000000..eb1b65b6 --- /dev/null +++ b/Squello-Core.package/SPBLabelMorph.class/instance/applyUserInterfaceTheme.st @@ -0,0 +1,5 @@ +as yet unclassified +applyUserInterfaceTheme + + super applyUserInterfaceTheme. + self font: (self userInterfaceTheme get: #font for: PluggableButtonMorph). \ No newline at end of file diff --git a/Squello-Core.package/SPBLabelMorph.class/instance/initialize.st b/Squello-Core.package/SPBLabelMorph.class/instance/initialize.st new file mode 100644 index 00000000..1986c7f6 --- /dev/null +++ b/Squello-Core.package/SPBLabelMorph.class/instance/initialize.st @@ -0,0 +1,8 @@ +as yet unclassified +initialize + + super initialize. + self cornerStyle: #rounded; + cornerRadius: 8; + margins: 4@2. + self applyUserInterfaceTheme. \ No newline at end of file diff --git a/Squello-Core.package/SPBLabelMorph.class/methodProperties.json b/Squello-Core.package/SPBLabelMorph.class/methodProperties.json new file mode 100644 index 00000000..e11af5f6 --- /dev/null +++ b/Squello-Core.package/SPBLabelMorph.class/methodProperties.json @@ -0,0 +1,6 @@ +{ + "class" : { + }, + "instance" : { + "applyUserInterfaceTheme" : "AH 6/20/2024 23:12", + "initialize" : "AH 6/20/2024 23:06" } } diff --git a/Squello-Core.package/SPBLabelMorph.class/properties.json b/Squello-Core.package/SPBLabelMorph.class/properties.json new file mode 100644 index 00000000..54784a95 --- /dev/null +++ b/Squello-Core.package/SPBLabelMorph.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Squello-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "SPBLabelMorph", + "pools" : [ + ], + "super" : "TextMorph", + "type" : "normal" }