Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion src/Pyramid-Bloc/PyramidChangeTextCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ PyramidChangeTextCommand >> setValueFor: aBlTextElement with: aString [
rope := aString asRopedText.

attributes do: [ :a | rope attribute: a ].
aBlTextElement text: rope
aBlTextElement text: rope.
"Fix label color on theme change when label is create during the session without copy or open from save"
aBlTextElement parent ifNil: [ ^ self ].
(((aBlTextElement parent)class) name) = (#ToLabel)
ifTrue: [ aBlTextElement parent text: aString asRopedText ]
]
8 changes: 4 additions & 4 deletions src/Pyramid-Bloc/PyramidDrawOrderIcons.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ blpaintbackground2 := BlPaintBackground new.
PyramidDrawOrderIcons class >> formMoveBackward [

^ (BlElement new
size: 16 @ 16;
extent: 16 @ 16;
addChildren: self blocMoveBackward materializeAsBlElement)
exportAsForm
]
Expand All @@ -233,7 +233,7 @@ PyramidDrawOrderIcons class >> formMoveBackward [
PyramidDrawOrderIcons class >> formMoveForward [

^ (BlElement new
size: 16 @ 16;
extent: 16 @ 16;
addChildren: self blocMoveForward materializeAsBlElement)
exportAsForm
]
Expand All @@ -242,7 +242,7 @@ PyramidDrawOrderIcons class >> formMoveForward [
PyramidDrawOrderIcons class >> formOnBackground [

^ (BlElement new
size: 16 @ 16;
extent: 16 @ 16;
addChildren: self blocOnBackground materializeAsBlElement)
exportAsForm
]
Expand All @@ -251,7 +251,7 @@ PyramidDrawOrderIcons class >> formOnBackground [
PyramidDrawOrderIcons class >> formOnForeground [

^ (BlElement new
size: 16 @ 16;
extent: 16 @ 16;
addChildren: self blocOnForeground materializeAsBlElement)
exportAsForm
]
2 changes: 1 addition & 1 deletion src/Pyramid-Bloc/PyramidLibraryDefault.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ PyramidLibraryDefault >> smalltalkIconsCategory [
name: each key;
block: [
{ (BlElement new
size: each value extent;
extent: each value extent;
background:
(BlImageBackground image:
(PyramidExternalRessourceProxy fromSource:
Expand Down
6 changes: 3 additions & 3 deletions src/Pyramid-Bloc/PyramidSelectionMakerExtension.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ PyramidSelectionMakerExtension >> dragEvent: anEvent [

xmin := self dragOrigin x min: anEvent position x.
ymin := self dragOrigin y min: anEvent position y.

self selectionGhost
position: xmin @ ymin;
size: (anEvent position - self dragOrigin) abs
extent: (anEvent position - self dragOrigin) abs
]

{ #category : #accessing }
Expand All @@ -100,7 +100,7 @@ PyramidSelectionMakerExtension >> dragStart: anEvent [
self dragOrigin: anEvent position.

self selectionGhost
size: 0 @ 0;
extent: 0 @ 0;
position: self dragOrigin;
visibility: BlVisibility visible
]
Expand Down
4 changes: 2 additions & 2 deletions src/Pyramid-Bloc/PyramidVisualPystonForCly.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ PyramidVisualPystonForCly >> build [
blElement isCollection ifTrue: [
blElement := BlElement new
addChildren: blElement;
size: 1500 @ 1500;
extent: 1500 @ 1500;
yourself ].
imageMorph := ImageMorph withForm: blElement exportAsForm.
self addMorph: imageMorph fullFrame: LayoutFrame identity.
Expand Down Expand Up @@ -242,7 +242,7 @@ PyramidVisualPystonForCly >> update [
blElement isCollection ifTrue: [
blElement := BlElement new
addChildren: blElement;
size: 1500 @ 1500;
extent: 1500 @ 1500;
yourself ].

imageMorph form: blElement exportAsForm
Expand Down
85 changes: 85 additions & 0 deletions src/Pyramid-Toplo/PyramidAddStampPresenter.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Class {
#name : #PyramidAddStampPresenter,
#superclass : #SpPresenter,
#instVars : [
'stampManagerPresenter',
'treeTableAddStamp',
'selectedStampToAdd',
'addStampButton'
],
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #adding }
PyramidAddStampPresenter >> addSelectedStampToElement [

selectedStampToAdd ifNil: [ ^ self ].

selectedStampToAdd command
setValueFor: self stampManagerPresenter currentSelectedElement
with: true.

self refreshStampTreeTable.
]

{ #category : #accessing }
PyramidAddStampPresenter >> addStampButton [

^ addStampButton
]

{ #category : #layout }
PyramidAddStampPresenter >> defaultLayout [

| defaultLayout stampToolBarAddButton |

defaultLayout := SpBoxLayout newVertical spacing: 6; yourself.

stampToolBarAddButton := SpBoxLayout newHorizontal hAlignStart; yourself.
stampToolBarAddButton add: addStampButton width: 380.

defaultLayout add: treeTableAddStamp expand: true.
defaultLayout add: stampToolBarAddButton expand: false.

^ defaultLayout
]

{ #category : #'initialization - deprecated' }
PyramidAddStampPresenter >> initializePresenter [

addStampButton := SpButtonPresenter new
label: 'Add Stamp';
icon: (Smalltalk ui icons iconNamed: #add);
whenActivatedDo: [ self addSelectedStampToElement ].

treeTableAddStamp := SpTreeTablePresenter new.
treeTableAddStamp whenSelectedItemChangedDo: [ :aStampSelected | selectedStampToAdd := aStampSelected ].
treeTableAddStamp addColumn: (SpCompositeTableColumn new
title: 'List of stamps';
addColumn: (SpStringTableColumn evaluated: #name);
yourself).
]

{ #category : #adding }
PyramidAddStampPresenter >> refreshStampTreeTable [

self stampManagerPresenter refreshStampTreeTable
]

{ #category : #accessing }
PyramidAddStampPresenter >> stampManagerPresenter [

^ stampManagerPresenter
]

{ #category : #accessing }
PyramidAddStampPresenter >> stampManagerPresenter: aPyramidStampManagerPresenter [

stampManagerPresenter := aPyramidStampManagerPresenter
]

{ #category : #accessing }
PyramidAddStampPresenter >> treeTableAddStamp [

^ treeTableAddStamp
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
'invalidSelectors',
'ignoredSelectors'
],
#category : #'Pyramid-Toplo-EXPERIMENTAL-plugin-theme-management'
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #operating }
Expand Down
15 changes: 7 additions & 8 deletions src/Pyramid-Toplo/PyramidElementThemeSelectorPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ Class {
#superclass : #PyramidThemeSelectorPresenter,
#instVars : [
'projectModel',
'themePropertyManager',
'inheritSelector',
'labelPresenter',
'commandExecutor',
'themeCommand'
],
#category : #'Pyramid-Toplo-EXPERIMENTAL-plugin-theme-management'
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #'as yet unclassified' }
Expand Down Expand Up @@ -67,7 +68,7 @@ PyramidElementThemeSelectorPresenter >> elementsOrSelectionChanged: anEvent [

self triggerThemeChangement: false.
self updatePresenterFor: anEvent selection.
self triggerThemeChangement: true
self triggerThemeChangement: true.
]

{ #category : #accessing }
Expand All @@ -83,7 +84,7 @@ PyramidElementThemeSelectorPresenter >> initializePresenters [
themeCommand := PyramidThemeCommand new.
inheritSelector := SpCheckBoxPresenter new
label: 'Inherits from parents';
whenChangedDo: [ :aBoolean | self applyTheme ];
whenChangedDo: [ :aBoolean | self applyTheme. self themeSelector enabled: (aBoolean not) ];
yourself.
labelPresenter := SpLabelPresenter new
label: 'Element Theme (empty select)';
Expand All @@ -110,11 +111,11 @@ PyramidElementThemeSelectorPresenter >> projectModel [
PyramidElementThemeSelectorPresenter >> projectModel: aPyramidProjectModel [

projectModel := aPyramidProjectModel.
projectModel
projectModel announcer
when: PyramidElementsChangedEvent
do: [ :evt | self elementsOrSelectionChanged: evt ]
for: self.
projectModel
projectModel announcer
when: PyramidSelectionChangedEvent
do: [ :evt | self elementsOrSelectionChanged: evt ]
for: self.
Expand Down Expand Up @@ -170,7 +171,5 @@ PyramidElementThemeSelectorPresenter >> updatePresenterFor: aCollectionOfElement
collectionOfLocalThemes first ifNotNil: [
self inheritSelector state: false.
self themeSelector enabled: true.
self selectTheme: collectionOfLocalThemes first ].

self layout: self defaultLayout
self selectTheme: collectionOfLocalThemes first ]
]
2 changes: 1 addition & 1 deletion src/Pyramid-Toplo/PyramidSelectorPossibleStamps.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'theme'
],
#category : #'Pyramid-Toplo-EXPERIMENTAL-plugin-theme-management'
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #'as yet unclassified' }
Expand Down
25 changes: 24 additions & 1 deletion src/Pyramid-Toplo/PyramidSpaceThemeSelectorPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {
#instVars : [
'projectModel'
],
#category : #'Pyramid-Toplo-EXPERIMENTAL-plugin-theme-management'
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #'as yet unclassified' }
Expand All @@ -16,6 +16,29 @@ PyramidSpaceThemeSelectorPresenter >> applyTheme [
self projectModel informElementsChanged
]

{ #category : #accessing }
PyramidSpaceThemeSelectorPresenter >> builder [

^ builder
]

{ #category : #accessing }
PyramidSpaceThemeSelectorPresenter >> builder: anObject [

builder:= anObject.
]

{ #category : #accessing }
PyramidSpaceThemeSelectorPresenter >> editor: aPyramidEditor [
]

{ #category : #displaying }
PyramidSpaceThemeSelectorPresenter >> installOn: aBuilder [

self builder: aBuilder.

]

{ #category : #initialization }
PyramidSpaceThemeSelectorPresenter >> labelPresenter [

Expand Down
2 changes: 1 addition & 1 deletion src/Pyramid-Toplo/PyramidStampCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'stamp'
],
#category : #'Pyramid-Toplo-EXPERIMENTAL-plugin-theme-management'
#category : #'Pyramid-Toplo-plugin-theme-management'
}

{ #category : #'as yet unclassified' }
Expand Down
Loading
Loading