The Trunk: Morphic-bf.393.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-bf.393.mcz

commits-2
Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.393.mcz

==================== Summary ====================

Name: Morphic-bf.393
Author: bf
Time: 26 March 2010, 11:11:18.459 am
UUID: bc296194-18a7-45b8-9f67-4722e6e37749
Ancestors: Morphic-laza.392

- dim inactive window's title bar buttons (but keep them responsive)

=============== Diff against Morphic-laza.392 ===============

Item was changed:
  ----- Method: SystemWindowButton>>lock (in category 'accessing') -----
  lock
+ self firstSubmorph form: self dimmedForm.
- self passivate.
  super lock!

Item was added:
+ ----- Method: SystemWindow>>undimWindowButtons (in category 'top window') -----
+ undimWindowButtons
+ {closeBox. collapseBox. menuBox. expandBox}
+ do: [:b | b ifNotNil: [b undim]]!

Item was changed:
  ----- Method: SystemWindow>>lockInactivePortions (in category 'top window') -----
  lockInactivePortions
  "Make me unable to respond to mouse and keyboard.  Control boxes remain active, except in novice mode"
 
  self submorphsDo: [:m | m == labelArea ifFalse: [m lock]].
+ self dimWindowButtons.
  labelArea ifNotNil:
+ [labelArea submorphsDo:
+ [:m |
+ (Preferences noviceMode or: [m ~~ closeBox and: [m ~~ collapseBox]])
+ ifTrue: [m lock]]]
+ ifNil: "i.e. label area is nil, so we're titleless"
+ [self adjustBorderUponDeactivationWhenLabeless].!
- [labelArea submorphsDo:
- [:m |
- (m == closeBox or: [m == collapseBox])
- ifTrue: [m lock]]]!

Item was changed:
  ----- Method: SystemWindow>>passivate (in category 'top window') -----
  passivate
  "Make me unable to respond to mouse and keyboard"
 
  label ifNotNil: [label color: Color darkGray].
  self setStripeColorsFrom: self paneColorToUse.
  model modelSleep.
 
+ self lockInactivePortions
- self submorphsDo: [:m |
- m == labelArea ifFalse:
- [m lock]].
-
- "Control boxes remain active, except in novice mode"
- labelArea
- ifNotNil: [
- labelArea submorphsDo: [:m |
- (Preferences noviceMode not and: [m == closeBox or: [m == collapseBox]]) ifFalse: [m lock]]]
- ifNil: "i.e. label area is nil, so we're titleless"
- [self adjustBorderUponDeactivationWhenLabeless].
  !

Item was changed:
  IconicButton subclass: #SystemWindowButton
+ instanceVariableNames: 'dimmed dimmedForm highlightedForm'
- instanceVariableNames: 'dimmedForm highlightedForm'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Morphic-Windows'!

Item was changed:
  ----- Method: SystemWindow>>activateWindow (in category 'top window') -----
  activateWindow
  "Bring me to the front and make me able to respond to mouse and keyboard.
  Was #activate (sw 5/18/2001 23:20)"
 
  | oldTop outerMorph sketchEditor pal |
  outerMorph := self topRendererOrSelf.
  outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"].
  oldTop := TopWindow.
  oldTop = self ifTrue: [^self].
  TopWindow := self.
  oldTop ifNotNil: [oldTop passivate].
  outerMorph owner firstSubmorph == outerMorph
  ifFalse: ["Bring me (with any flex) to the top if not already"
  outerMorph owner addMorphFront: outerMorph].
  self submorphsDo: [:m | m unlock].
 
  label ifNotNil: [label color: Color black].
 
+ self undimWindowButtons.
  labelArea ifNotNil:
  [labelArea submorphsDo: [:m | m unlock; show].
  self setStripeColorsFrom: self paneColorToUse].
  self isCollapsed ifFalse:
  [model modelWakeUpIn: self.
  self positionSubmorphs.
  labelArea ifNil: [self adjustBorderUponActivationWhenLabeless]].
 
  (sketchEditor := self extantSketchEditor) ifNotNil:
  [sketchEditor comeToFront.
  (pal := self world findA: PaintBoxMorph) ifNotNil:
  [pal comeToFront]].
  !

Item was added:
+ ----- Method: SystemWindowButton>>dim (in category 'visual properties') -----
+ dim
+ dimmed := true.
+ self restoreImage.!

Item was added:
+ ----- Method: SystemWindowButton>>undim (in category 'visual properties') -----
+ undim
+ dimmed := false..
+ self isLocked ifFalse: [self restoreImage].!

Item was added:
+ ----- Method: SystemWindow>>dimWindowButtons (in category 'top window') -----
+ dimWindowButtons
+ self == TopWindow ifFalse: [
+ {closeBox. collapseBox. menuBox. expandBox}
+ do: [:b | b ifNotNil: [b dim]]]!

Item was changed:
  ----- Method: IconicButton>>darkenedForm (in category 'as yet unclassified') -----
  darkenedForm
+ ^ darkenedForm ifNil: [ darkenedForm := self firstSubmorph baseGraphic darker ]!
- ^ darkenedForm ifNil: [ darkenedForm := self firstSubmorph form darker ]!

Item was changed:
  ----- Method: SystemWindowButton>>dimmedForm (in category 'visual properties') -----
  dimmedForm
+ ^ dimmedForm ifNil: [ dimmedForm := self firstSubmorph baseGraphic dimmed ]!
- ^ dimmedForm ifNil: [ dimmedForm := self firstSubmorph form dimmed ]!

Item was added:
+ ----- Method: SystemWindowButton>>restoreImage (in category 'visual properties') -----
+ restoreImage
+ dimmed == true
+ ifTrue: [self firstSubmorph form: self dimmedForm]
+ ifFalse: [super restoreImage]
+ !

Item was changed:
  ----- Method: SystemWindowButton>>highlightedForm (in category 'visual properties') -----
  highlightedForm
+ ^ highlightedForm ifNil: [ highlightedForm := self firstSubmorph baseGraphic lighter ]!
- ^ highlightedForm ifNil: [ highlightedForm := self firstSubmorph form lighter ]!

Item was removed:
- ----- Method: SystemWindowButton>>passivate (in category 'visual properties') -----
- passivate
-
- self firstSubmorph form: self dimmedForm
- !