Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toplo with themes and skins #156

Merged
merged 29 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2fe28db
Ajout du début des stamps
Nyan11 Jan 30, 2024
5b1a09e
Add stamps property to toplo theme panel
Nyan11 Jan 31, 2024
c9b2977
Fix bug tooltip on stamps update
Nyan11 Jan 31, 2024
6c725a3
Add TU for intrepeter of valid selector
Nyan11 Jan 31, 2024
0a60985
Fix labeled icon bug on ToButton
Nyan11 Jan 31, 2024
57c9158
Add select theme first option
Nyan11 Jan 31, 2024
87fe948
Different hook to change the theme for the space
Nyan11 Feb 1, 2024
2cae76f
Add theme for single element
Nyan11 Feb 1, 2024
3430f1b
Add toTheme command
Nyan11 Feb 1, 2024
f3a26ac
Bug: change space theme must recreate the stamps info
Nyan11 Feb 1, 2024
0f8ff8c
Add opne with correct theme
Nyan11 Feb 1, 2024
db10af6
Add closing event to set the current pyramid toTheme space
Nyan11 Feb 1, 2024
34eb94e
updateBaseline for Toplo
Nyan11 Feb 1, 2024
9f456a5
Add missing repository
Nyan11 Feb 1, 2024
7a9e37a
Fix on leaf for to element
Nyan11 Feb 1, 2024
8c72c82
Fix baseline
Nyan11 Feb 1, 2024
d42c45b
better naming on baseline
Nyan11 Feb 1, 2024
4039638
Fix for toplo baseline
Nyan11 Feb 1, 2024
17e641d
Fix all example for Toplo readiness
Nyan11 Feb 1, 2024
8a06cf9
Baseline: Change Bloc and Toplo groups name
labordep Mar 8, 2024
f123047
Baseline: Fix Bloc and Toplo branches
labordep Mar 8, 2024
91fbb26
Merge branch 'main' into Issue_0155
labordep Mar 8, 2024
e82127c
Baseline: change groups name
labordep Mar 8, 2024
4e65b18
Baseline: fix toplo packages names
labordep Mar 8, 2024
26cec4e
TreePresenter plugin: Rename isLeaf
labordep Mar 8, 2024
91ebe30
Remove not working example + small fixes
Nyan11 Mar 8, 2024
3bf8d9e
Merge 26cec4e5f4e290bbfaf39c2b04d670ba95bde32c
Nyan11 Mar 8, 2024
1f93199
fix baseline
Nyan11 Mar 8, 2024
483b67c
Remove equality that are now on Bloc + fix toTheme class selection
Nyan11 Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 101 additions & 22 deletions src/BaselineOfPyramid/BaselineOfPyramid.class.st
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for this new baseline.
I don't think this is usefull to have separate version because users have to use Toplo... however if we succeed to execute CI in these two baselines it is a good practice to have a better architecture.

Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,115 @@ Class {
BaselineOfPyramid >> baseline: spec [

<baseline>
spec for: #common do: [
spec postLoadDoIt: #postload:package:.
self dependencies: spec.
spec
package: #Pyramid;
package: #'Pyramid-IDE' with: [ spec requires: #( #Pyramid ) ];
package: #'Pyramid-Bloc'
with: [ spec requires: #( #Pyramid #Bloc #BlocSerialization ) ];
package: #'Pyramid-Tests'
with: [ spec requires: #( #Pyramid #'Pyramid-Bloc' ) ];
package: #'Pyramid-Examples'
with: [ spec requires: #( #Pyramid ) ];
package: #'Pyramid-IDE' with: [ spec requires: #( #Pyramid ) ] ]
"Common baseline for all Pharo versions"
spec for: #common do: [ self baselineForCommon: spec ]
]

{ #category : #baselines }
BaselineOfPyramid >> dependencies: spec [
BaselineOfPyramid >> baselineForCommon: spec [

spec
baseline: #Bloc
with: [
spec repository: 'github://pharo-graphics/Bloc:master/src' ].
spec
baseline: #BlocSerialization
with: [
spec repository: 'github://OpenSmock/Bloc-Serialization:main/src' ].
<baseline>
spec preLoadDoIt: #preload:package:.
spec postLoadDoIt: #postload:package:.

"Dependencies"
self blocDependencies: spec.
self toploDependencies: spec.

"Packages"
self pyramidPackages: spec.
self blocPackages: spec.
self toploPackages: spec.

"Groups"
spec group: 'default' with: #( 'BlocUI' 'ToploUI' ). "complete version"
spec group: 'BlocUI' with: self blocPackagesNames. "only Bloc"
spec group: 'ToploUI' with: self toploPackagesNames "only Bloc and Toplo"
]

{ #category : #dependencies }
BaselineOfPyramid >> blocDependencies: spec [

spec
baseline: 'Bloc'
with: [ spec repository: 'github://pharo-graphics/Bloc:master/src' ].
spec
baseline: 'BlocSerialization'
with: [
spec repository: 'github://OpenSmock/Bloc-Serialization:main/src' ]
]

{ #category : #packages }
BaselineOfPyramid >> blocPackages: spec [

spec
package: 'Pyramid-Bloc'
with: [ spec requires: #( 'Pyramid' 'Bloc' ) ].
spec
package: 'Pyramid-Tests'
with: [ spec requires: #( 'Pyramid-Bloc' ) ].
spec
package: 'Pyramid-Examples'
with: [ spec requires: #( 'Pyramid-Bloc' ) ]
]

{ #category : #packages }
BaselineOfPyramid >> blocPackagesNames [

^ #( 'Pyramid' 'Pyramid-Bloc' 'Pyramid-Tests' 'Pyramid-IDE' 'Pyramid-Examples' )
]

{ #category : #actions }
BaselineOfPyramid >> postload: loader package: packageSpec [

PyramidPluginManager reset
]

{ #category : #actions }
BaselineOfPyramid >> preload: loader package: packageSpec [

]

{ #category : #packages }
BaselineOfPyramid >> pyramidPackages: spec [

spec package: 'Pyramid'.
spec
package: 'Pyramid-IDE'
with: [ spec requires: #( 'Pyramid' ) ].

]

{ #category : #dependencies }
BaselineOfPyramid >> toploDependencies: spec [

spec
baseline: 'Toplo'
with: [ spec repository: 'github://pharo-graphics/Toplo:master/src' ].
spec
baseline: 'ToploSerialization'
with: [ spec repository: 'github://OpenSmock/Toplo-Serialization:main/src' ]
]

{ #category : #packages }
BaselineOfPyramid >> toploPackages: spec [

spec
package: 'Pyramid-Toplo'
with: [ spec requires: #( 'Toplo' 'ToploSerialization') ].
spec
package: 'Pyramid-Toplo-Tests'
with: [ spec requires: #( 'Pyramid-Toplo' ) ].
spec
package: 'Pyramid-Toplo-Examples'
with: [ spec requires: #( 'Pyramid-Toplo' ) ]
]

{ #category : #packages }
BaselineOfPyramid >> toploPackagesNames [

| packages |
packages := self blocPackagesNames asOrderedCollection.
packages addAll: #( 'Pyramid-Toplo' 'Pyramid-Toplo-Tests' 'Pyramid-Toplo-Examples' ).
^ packages asArray
]
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlBackground.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlBackground }

{ #category : #'*Pyramid-Bloc' }
BlBackground >> = aBlBackground [

aBlBackground == self ifTrue: [ ^ true ].
^ aBlBackground class = self class
]

{ #category : #'*Pyramid-Bloc' }
BlBackground >> asForm [

Expand Down
8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlEllipseGeometry.extension.st

This file was deleted.

11 changes: 0 additions & 11 deletions src/Pyramid-Bloc/BlFlowLayout.extension.st
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
Extension { #name : #BlFlowLayout }

{ #category : #'*Pyramid-Bloc' }
BlFlowLayout >> = anObject [

self == anObject ifTrue: [ ^ true ].
self class = anObject class ifFalse: [ ^ false ].
self orientation = anObject orientation ifFalse: [ ^ false ].
self horizontalAlignment = anObject horizontalAlignment ifFalse: [ ^ false ].
self verticalAlignment = anObject verticalAlignment ifFalse: [ ^ false ].
^ true
]

{ #category : #'*Pyramid-Bloc' }
BlFlowLayout >> asIcon [

Expand Down
8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
Extension { #name : #BlGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> = aBlPaint [

self == aBlPaint ifTrue: [ ^ true ].
self class == aBlPaint class ifFalse: [ ^ false ].
^ self stops = aBlPaint stops
]

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> asForm [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlImageBackground.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlImageBackground }

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> = aBlBackground [

super = aBlBackground ifFalse: [ ^ false ].
^ self image = aBlBackground image
]

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> asForm [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlLayout.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlLayout }

{ #category : #'*Pyramid-Bloc' }
BlLayout >> = anObject [

self == anObject ifTrue: [ ^ true ].
^ self class = anObject class
]

{ #category : #'*Pyramid-Bloc' }
BlLayout >> asIcon [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlLinearGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlLinearGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlLinearGradientPaint >> = aBlPaint [

super = aBlPaint ifFalse: [ ^ false ].
^ self end = aBlPaint end and: [ self start = aBlPaint start ]
]

{ #category : #'*Pyramid-Bloc' }
BlLinearGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [

Expand Down
7 changes: 0 additions & 7 deletions src/Pyramid-Bloc/BlRadialGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Extension { #name : #BlRadialGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlRadialGradientPaint >> = aBlPaint [

super = aBlPaint ifFalse: [ ^ false ].
^ self innerCenter = aBlPaint innerCenter and: [ self innerRadius = aBlPaint innerRadius and: [ self outerCenter = aBlPaint outerCenter and: [ self outerRadius = aBlPaint outerRadius ] ] ]
]

{ #category : #'*Pyramid-Bloc' }
BlRadialGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [

Expand Down
8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlRectangleGeometry.extension.st

This file was deleted.

8 changes: 0 additions & 8 deletions src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st

This file was deleted.

34 changes: 34 additions & 0 deletions src/Pyramid-Bloc/PyramidOpenFromSpacePlugin.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Class {
#name : #PyramidOpenFromSpacePlugin,
#superclass : #Object,
#traits : 'TPyramidPlugin',
#classTraits : 'TPyramidPlugin classTrait',
#instVars : [
'extensions'
],
#category : #'Pyramid-Bloc-plugin-edit-on-running'
}

{ #category : #adding }
PyramidOpenFromSpacePlugin >> addExtension: anExtension [

self extensions add: anExtension
]

{ #category : #accessing }
PyramidOpenFromSpacePlugin >> extensions [

^ extensions
]

{ #category : #accessing }
PyramidOpenFromSpacePlugin >> initialize [

extensions := OrderedCollection new.
]

{ #category : #adding }
PyramidOpenFromSpacePlugin >> removeExetension: anExtension [

self extensions remove: anExtension
]
48 changes: 14 additions & 34 deletions src/Pyramid-Bloc/PyramidPluginEditOnRunning.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,20 @@ PyramidPluginEditOnRunning class >> cleanUp: anObject [
PyramidPluginEditOnRunning class >> doShortcutAction: anEvent [

| space editor whenClosedDo |

self flag:'labordep: this is a temporary processing because this fork is due to a Bloc opened issue'.
(shortcutFork notNil and:[ shortcutFork isTerminated not ]) ifTrue:[ ^ self ].

shortcutFork := [

self editOnRunning ifTrue:[
space := anEvent source space.
(self canEditSpace: space) ifTrue:[
editor := space editWithPyramid.
whenClosedDo := editor window whenClosedDo.
editor window whenClosedDo: [ whenClosedDo value ].
].
].

] forkAt: Processor userBackgroundPriority named: 'Pyramid edit-on-running plugin shortcut'
self flag:
'labordep: this is a temporary processing because this fork is due to a Bloc opened issue'.
(shortcutFork notNil and: [ shortcutFork isTerminated not ]) ifTrue: [
^ self ].

shortcutFork := [
self editOnRunning ifTrue: [
space := anEvent source space.
(self canEditSpace: space) ifTrue: [
editor := space editWithPyramid.
whenClosedDo := editor window whenClosedDo.
editor window whenClosedDo: [ whenClosedDo value ] ] ] ]
forkAt: Processor userBackgroundPriority
named: 'Pyramid edit-on-running plugin shortcut'
]

{ #category : #accessing }
Expand Down Expand Up @@ -151,21 +149,3 @@ PyramidPluginEditOnRunning class >> uninstallBlUniverseListeners [

Beacon instance unsubscribe: self
]

{ #category : #adding }
PyramidPluginEditOnRunning >> addPanelsOn: aPyramidSimpleWindow [

"do nothing"
]

{ #category : #actions }
PyramidPluginEditOnRunning >> configureBuilder: aPyramidEditorBuilder [

"do nothing"
]

{ #category : #connecting }
PyramidPluginEditOnRunning >> connectOn: aPyramidEditor [

"do nothing"
]
8 changes: 4 additions & 4 deletions src/Pyramid-Bloc/PyramidSpaceBuilder.class.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Class {
#name : #PyramidSpaceBuilder,
#superclass : #Object,
#traits : 'TPyramidEditorTransformation',
#classTraits : 'TPyramidEditorTransformation classTrait',
#traits : 'TPyramidEditorTransformation + TPyramidEditorSpaceIsReady',
#classTraits : 'TPyramidEditorTransformation classTrait + TPyramidEditorSpaceIsReady classTrait',
#instVars : [
'topMostOverlay',
'overlays',
Expand Down Expand Up @@ -103,6 +103,7 @@ PyramidSpaceBuilder >> build [

self signalTransformationChanged.
self topMostOverlay buildOn: self space root.
self signalSpaceIsReady.
^ self space
]

Expand All @@ -111,8 +112,7 @@ PyramidSpaceBuilder >> editor: aPyramidEditor [

self extensions do: [ :each | each editor: aPyramidEditor ].
self extensions do: [ :each |
each projectModel: aPyramidEditor projectModel ].

each projectModel: aPyramidEditor projectModel ]
]

{ #category : #accessing }
Expand Down
3 changes: 2 additions & 1 deletion src/Pyramid-Bloc/PyramidSpacePlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ PyramidSpacePlugin >> makePresenterWithBlSpace: aBlSpace [
aBlSpace host: host.
aBlSpace addEventHandler: (BlEventHandler
on: BlSpaceDestroyedEvent
do: [ :evt | self updateMorphInCaseOfFaillure: morph ]).
do: [ :evt |
self updateMorphInCaseOfFaillure: morph ]).

self morphicPresenter morph: morph.
self morphicPresenter whenDisplayDo: [ aBlSpace show ]
Expand Down
Loading
Loading