diff --git a/src/Bloc-Alexandrie-Tests/BlSpaceFixture.class.st b/src/Bloc-Alexandrie-Tests/BlSpaceFixture.class.st index f41fa97e9..9bb52813c 100644 --- a/src/Bloc-Alexandrie-Tests/BlSpaceFixture.class.st +++ b/src/Bloc-Alexandrie-Tests/BlSpaceFixture.class.st @@ -114,6 +114,41 @@ BlSpaceFixture >> buildCapRoundDashedBorderOnClosedGeometry [ ] +{ #category : #fixtures } +BlSpaceFixture >> buildChildDoesntInheritDashedBorder [ + + | outskirts | + builder spaceExtent: 90 @ 50. + builder space root layout: BlFlowLayout horizontal. + + outskirts := { + BlOutskirts centered. + BlOutskirts inside. + BlOutskirts outside }. + + #(true false) do: [ :childHasBorder | + outskirts do: [ :eachOutskirt | + | parent child | + parent := builder addToRoot + size: 25 @ 20; + margin: (BlInsets all: 2.5); + outskirts: eachOutskirt; + layout: BlFrameLayout new; + border: (BlBorder builder + paint: Color blue; + width: 2; + dashArray: #(2 2); + build). + child := (builder addTo: parent) + size: 12 asPoint; + constraintsDo: [ :c | + c frame horizontal alignCenter. + c frame vertical alignCenter ]. + childHasBorder ifTrue: [ + child border: (BlBorder paint: Color white width: 4) ] ] ] + +] + { #category : #fixtures } BlSpaceFixture >> buildClippingAbsolutelyTransparentElement [ "Add 3 elements, where only the last one should be clipped by it's transparent parent. diff --git a/src/Bloc-Alexandrie/BlBorder.extension.st b/src/Bloc-Alexandrie/BlBorder.extension.st index 3e4148356..5076a02ca 100644 --- a/src/Bloc-Alexandrie/BlBorder.extension.st +++ b/src/Bloc-Alexandrie/BlBorder.extension.st @@ -20,9 +20,9 @@ BlBorder >> aeApplyTo: aeCanvas element: aBlElement [ aeCanvas setBorderBlock: [ paint aeApplyTo: aeCanvas. - "No dashes is the default" - style dashArray ifNotEmpty: [ :da | - aeCanvas setDashes: da offset: style dashOffset ]. + aeCanvas + setDashes: style dashArray + offset: style dashOffset. aBlElement geometry hasJoins ifTrue: [ style lineJoin diff --git a/src/Bloc-Alexandrie/BlTextBorderAttribute.extension.st b/src/Bloc-Alexandrie/BlTextBorderAttribute.extension.st index 5192ed247..893b50e97 100644 --- a/src/Bloc-Alexandrie/BlTextBorderAttribute.extension.st +++ b/src/Bloc-Alexandrie/BlTextBorderAttribute.extension.st @@ -28,10 +28,9 @@ BlTextBorderAttribute >> aeDrawOn: aeCanvas span: aBASpan [ aeCanvas setBorderBlock: [ border paint aeApplyTo: aeCanvas. - border style dashArray ifNotEmpty: [ :da | - aeCanvas - setDashes: da - offset: border style dashOffset ]. + aeCanvas + setDashes: border style dashArray + offset: border style dashOffset. border style lineJoin aeApplyTo: aeCanvas diff --git a/tests/hit/buildChildDoesntInheritDashedBorder.png b/tests/hit/buildChildDoesntInheritDashedBorder.png new file mode 100644 index 000000000..13e30a382 Binary files /dev/null and b/tests/hit/buildChildDoesntInheritDashedBorder.png differ diff --git a/tests/render/buildChildDoesntInheritDashedBorder.png b/tests/render/buildChildDoesntInheritDashedBorder.png new file mode 100644 index 000000000..435d77a9d Binary files /dev/null and b/tests/render/buildChildDoesntInheritDashedBorder.png differ