[squeak-dev] The Trunk: EToys-kfr.90.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Oct 27 14:43:14 UTC 2013
David T. Lewis uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-kfr.90.mcz
==================== Summary ====================
Name: EToys-kfr.90
Author: kfr
Time: 27 October 2013, 1:20:20.65 pm
UUID: d78224f0-2f95-d24e-9975-69477d89a347
Ancestors: EToys-bf.89
Add text alignments to properties panel
Remove call to missing addOptionalButtons from properties panel
=============== Diff against EToys-bf.89 ===============
Item was changed:
----- Method: ObjectPropertiesMorph>>rebuild (in category 'connectors-visual properties') -----
rebuild
| buttons |
self removeAllMorphs.
self addARow: {
self lockedString: ('Properties for {1}' translated format: {myTarget name}).
}.
self addARow: {
self inAColumn: {
self paneForCornerRoundingToggle.
self paneForStickinessToggle.
self paneForLockedToggle.
}.
}.
self addARow: {
self paneForMainColorPicker.
self paneFor2ndGradientColorPicker.
}.
self addARow: {
self paneForBorderColorPicker.
self paneForShadowColorPicker.
}.
buttons := OrderedCollection new.
buttons addAll: {
self
buttonNamed: 'Accept' translated action: #doAccept color: color lighter
help: 'keep changes made and close panel' translated.
self
buttonNamed: 'Cancel' translated action: #doCancel color: color lighter
help: 'cancel changes made and close panel' translated.
}.
+
- self addOptionalButtonsTo: buttons.
self addARow: buttons.
thingsToRevert := Dictionary new.
"thingsToRevert at: #fillStyle: put: myTarget fillStyle."
myTarget isSystemWindow ifTrue: [
thingsToRevert at: #setWindowColor: put: myTarget paneColorToUse
].
thingsToRevert at: #hasDropShadow: put: myTarget hasDropShadow.
thingsToRevert at: #shadowColor: put: myTarget shadowColor.
(myTarget respondsTo: #borderColor:) ifTrue: [
thingsToRevert at: #borderColor: put: myTarget borderColor.
].
thingsToRevert at: #borderWidth: put: myTarget borderWidth.
thingsToRevert at: #cornerStyle: put: myTarget cornerStyle.
thingsToRevert at: #sticky: put: myTarget isSticky.
thingsToRevert at: #lock: put: myTarget isLocked.
!
Item was added:
+ ----- Method: TextPropertiesMorph>>alignCenter (in category 'as yet unclassified') -----
+ alignCenter
+ self alignText: #centered.!
Item was added:
+ ----- Method: TextPropertiesMorph>>alignJustified (in category 'as yet unclassified') -----
+ alignJustified
+ self alignText: #justified.
+ !
Item was added:
+ ----- Method: TextPropertiesMorph>>alignLeft (in category 'as yet unclassified') -----
+ alignLeft
+ self alignText: #leftFlush.
+ !
Item was added:
+ ----- Method: TextPropertiesMorph>>alignRight (in category 'as yet unclassified') -----
+ alignRight
+ self alignText: #rightFlush.!
Item was added:
+ ----- Method: TextPropertiesMorph>>alignText: (in category 'as yet unclassified') -----
+ alignText: aSymbol
+ self applyToWholeText ifTrue: [self activeEditor selectAll].
+ self activeEditor setAlignment: aSymbol.
+ self activeEditor paragraph composeAll.
+ self activeEditor recomputeSelection.
+ self activeTextMorph updateFromParagraph.
+ !
Item was changed:
----- Method: TextPropertiesMorph>>rebuild (in category 'as yet unclassified') -----
rebuild
| buttonColor c |
self removeAllMorphs.
self addAColumn: {
self lockedString: ('Text Properties for {1}' translated format:{myTarget name}).
}.
self addAColumn: {
self paneForApplyToWholeText.
}.
c := self addAColumn: {
self activeTextMorph.
}.
c
wrapCentering: #topLeft;
color: Color white;
borderWidth: 2;
borderColor: color darker.
self addAColumn: {
self paneForTextColorPicker.
}.
self addARow: {
self paneForAutoFitToggle.
}.
self addARow: {
self paneForWrappingToggle.
}.
self addARow: {
self paneForMargins.
}.
buttonColor := color lighter.
self addARow: {
self inAColumn: {
self addARow: {
self
buttonNamed: 'Size' translated action: #offerFontMenu color: buttonColor
help: 'font changing' translated.
self
buttonNamed: 'Style' translated action: #changeStyle color: buttonColor
help: 'font changing' translated.
self
buttonNamed: 'N' translated action: #changeToNormalText color: buttonColor
help: 'normal text' translated.
self
buttonNamed: 'B' translated action: #toggleBold color: buttonColor
help: 'bold text' translated.
self
buttonNamed: 'I' translated action: #toggleItalic color: buttonColor
help: 'italic text' translated.
self
buttonNamed: 'n' translated action: #toggleNarrow color: buttonColor
help: 'narrow text' translated.
self
buttonNamed: 'U' translated action: #toggleUnderlined color: buttonColor
help: 'underlined text' translated.
self
buttonNamed: 'S' translated action: #toggleStruckOut color: buttonColor
help: 'struck out text' translated.
self
buttonNamed: 'Kern-' translated action: #kernMinus color: buttonColor
help: 'decrease kern' translated.
self
buttonNamed: 'Kern+' translated action: #kernPlus color: buttonColor
help: 'increase kern' translated.
}.
}.
}.
self addARow: {
self inAColumn: {
self addARow: {
self
+ buttonNamed: 'Left flush' translated action: #alignLeft color: buttonColor
+ help: 'align text to left side' translated.
+
+ self
+ buttonNamed: 'Center' translated action: #alignCenter color: buttonColor
+ help: 'align text to center' translated.
+ self
+ buttonNamed: 'Right Flush' translated action: #alignRight color: buttonColor
+ help: 'align text to right side' translated.
+ self
+ buttonNamed: 'Justified' translated action: #alignJustified color: buttonColor
+ help: 'justify text alignmet' translated.
+ }.
+ }.
+ }.
+ self addARow: {
+ self inAColumn: {
+ self addARow: {
+ self
buttonNamed: 'Accept' translated action: #doAccept color: buttonColor
help: 'keep changes made and close panel' translated.
self
buttonNamed: 'Cancel' translated action: #doCancel color: buttonColor
help: 'cancel changes made and close panel' translated.
}.
}.
}.
!
More information about the Squeak-dev
mailing list
|