Skip to content
Permalink
Browse files

Merge pull request #736 from jecisc/647-Use-theme-instead-of-hardcode…

…d-color-in-Modal-adapter

647-Use-theme-instead-of-hardcoded-color-in-Modal-adapter
  • Loading branch information...
jecisc committed Aug 17, 2019
2 parents eebffc5 + d83605f commit be583d81f760971898560ed50ea9a1571432f2e2
@@ -38,7 +38,7 @@ SpMorphicModalWindowAdapter >> open [
self model windowIsOpening.

backdropMorph := FullscreenMorph new
color: (Color black alpha: 0.7);
color: self theme modalBackdropColor;
on: #click send: #mouseClick:onBackdrop: to: self;
openInWorld;
yourself.
@@ -0,0 +1,8 @@
Extension { #name : #UITheme }

{ #category : #'*Spec2-Adapters-Morphic' }
UITheme >> modalBackdropColor [
self flag: #pharoTodo. "This method should probably be moved to Pharo later."

^ Color black alpha: 0.7
]
@@ -119,7 +119,7 @@ SpDemo >> initializeWidgets [

list
items: self availablePages;
displayBlock: [ :item | item pageName ];
display: [ :item | item pageName ];
contextMenu:
(self newMenu
addItem: [ :item |
@@ -209,7 +209,6 @@ SpDemoStandaloneFormPresenter >> initializePresenter [

{ #category : #initialization }
SpDemoStandaloneFormPresenter >> initializeWidgets [

nameLabel := self newLabel label: 'name:'.
nameTextInput := self newTextInput autoAccept: true.

@@ -220,7 +219,13 @@ SpDemoStandaloneFormPresenter >> initializeWidgets [
number1Input := self newNumberInput autoAccept: true.

number2Label := self newLabel label: 'number 2:'.
number2Input := self newNumberInput autoAccept: true; beFloat; digits: 3; climbRate: 0.005; minimum: 10.005; maximum: 20.05.
number2Input := self newNumberInput
autoAccept: true;
beFloat;
digits: 3;
climbRate: 0.005;
minimum: 10.005;
maximum: 20.05.

scaleLabel := self newLabel label: 'scale:'.
scaleInput := self newSlider.
@@ -234,16 +239,13 @@ SpDemoStandaloneFormPresenter >> initializeWidgets [

dateLabel := self newLabel label: 'date:'.
dateInput := self instantiate: SpDatePresenter.
dateInput displayBlock: [ :item | item yyyymmdd ].
maleButton := self newRadioButton label: 'male'.
dateInput display: [ :item | item yyyymmdd ].

maleButton := self newRadioButton label: 'male'.
femaleButton := self newRadioButton label: 'female'.
maleButton associatedRadioButtons: { femaleButton }.
genderButtons := Dictionary newFrom: {
#male -> maleButton.
#female -> femaleButton
}.

maleButton associatedRadioButtons: {femaleButton}.
genderButtons := Dictionary newFrom: {(#male -> maleButton) . (#female -> femaleButton)}.

genderLabel := self newLabel label: 'gender:'.
itemsLabel := self newLabel label: 'items:'.
itemsInput := self newList.

0 comments on commit be583d8

Please sign in to comment.
You can’t perform that action at this time.