[squeak-dev] The Trunk: Morphic-ar.387.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 25 04:20:32 UTC 2010


Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.387.mcz

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

Name: Morphic-ar.387
Author: ar
Time: 24 March 2010, 9:18:52.185 pm
UUID: f70b4b31-a697-884c-bc16-8a5f6928e92c
Ancestors: Morphic-ul.386

More facelifting for the trunk.

=============== Diff against Morphic-ul.386 ===============

Item was changed:
  AbstractResizerMorph subclass: #ProportionalSplitterMorph
+ 	instanceVariableNames: 'leftOrTop rightOrBottom splitsTopAndBottom oldColor traceMorph handle'
- 	instanceVariableNames: 'leftOrTop rightOrBottom splitsTopAndBottom oldColor traceMorph'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Windows'!
  
  !ProportionalSplitterMorph commentStamp: 'jmv 1/29/2006 17:16' prior: 0!
  I am the morph the user grabs to adjust pane splitters.!

Item was changed:
  ----- Method: SystemWindow>>boxExtent (in category 'initialization') -----
  boxExtent
+ 	"the label height is used to be proportional to the fonts preferences"
+ 	
+ 	^ self class boxExtent
- 	"answer the extent to use in all the buttons. 
- 	 
- 	the label height is used to be proportional to the fonts preferences"
- 	^ (Preferences alternativeWindowBoxesLook
- 		ifTrue: [18 @ 18]
- 		ifFalse: [14 @ 14])
  		max: label height @ label height !

Item was added:
+ ----- Method: SystemWindow class>>hideExpandButton (in category 'preferences') -----
+ hideExpandButton
+ 
+ 	<preference: 'Hide Expand Button'
+ 		category: 'windows'
+ 		description: 'Hides the expand button in all windows'
+ 		type: #Boolean>
+ 	^ HideExpandButton ifNil: [ false ]
+ !

Item was changed:
  ----- Method: SystemWindow>>initializeLabelArea (in category 'initialization') -----
  initializeLabelArea
  	"Initialize the label area (titlebar) for the window."
  	label := StringMorph new contents: labelString;
  						 font: Preferences windowTitleFont emphasis: 0.
  			"Add collapse box so #labelHeight will work"
  			collapseBox := self createCollapseBox.
  			stripes := Array
  						with: (RectangleMorph newBounds: bounds)
  						with: (RectangleMorph newBounds: bounds).
  			"see extent:"
  			self addLabelArea.
  			self setLabelWidgetAllowance.
  			self addCloseBox.
+ 			self class moveMenuButtonRight 
+ 				ifTrue: [self addLabel. self addMenuControl]
+ 				ifFalse: [self addMenuControl. self addLabel].
+ 			self addExpandBox.
- 			self addMenuControl.
- 			labelArea addMorphBack: (Morph new extent: self class borderWidth @ 0).
- 			labelArea addMorphBack: label.
- 			self wantsExpandBox
- 				ifTrue: [self addExpandBox].
  			labelArea addMorphBack: collapseBox.
  			self setFramesForLabelArea.
- 			Preferences clickOnLabelToEdit
- 				ifTrue: [label
- 						on: #mouseDown
- 						send: #relabel
- 						to: self].
  			Preferences noviceMode
  				ifTrue: [closeBox
  						ifNotNil: [closeBox setBalloonText: 'close window'].
  					menuBox
  						ifNotNil: [menuBox setBalloonText: 'window menu'].
  					collapseBox
  						ifNotNil: [collapseBox setBalloonText: 'collapse/expand window']].
  !

Item was changed:
  ----- Method: SystemWindow class>>expandBoxImage (in category 'initializing') -----
  expandBoxImage
  
+ 	^ ExpandBoxImage ifNil: [ExpandBoxImage := (Form
+ 	extent: 14 at 14
- 	^ ExpandBoxImage ifNil: [ (Form
- 	extent: 10 at 10
  	depth: 32
+ 	fromArray: #(0 0 1058562 285544960 1545616142 2838976800 3443812652 3443812652 2822199328 1545550349 285610496 1058562 0 0 197889 5015843 840445449 3057804586 4151680347 4288134782 4288989580 4288989580 4288134525 4151549016 3040961576 840379656 4949796 132352 2441745 857222409 3578360366 4287543665 4289187213 4289121422 4288857993 4288792456 4289121421 4289121677 4287478128 3578491696 840445193 2375953 285740802 3040304923 4286295641 4288070777 4288004983 4287543410 4288524177 4289312671 4287344755 4288004983 4288136313 4286624095 3040502048 285543680 1579236111 4149118761 4286297173 4286822495 4286888545 4286426462 4291679432 4293717227 4286752873 4286560090 4286428504 4286691421 4149578546 1562393102 2855294231 4283865130 4284326448 4284325172 4284718907 4284716865 4291416516 4293651691 4285043786 4284061998 4283996461 4284523316 4283996461 2838517015 3476513307 4284063275 4283865386 4287341947 4290759608 4290693559 4293717483 4294572537 4291153599 4290759607 4288129929 4283864876 4283997739 3459736090 3493290523 4284063275 4283799593 4289312927 4294243316 4294046193 4294769916 4294901502 4294177779 4294243316 4290364338 4283864621 4284063275 3476513306 2872071703 4283865130 4284063275 4284453693 4285176395 4285109069 4291811019 4293849070 4285962336 4285110602 4284585024 4283997227 4283799593 2872071447 1612856592 4165698852 4284195372 4284063786 4284064041 4283864620 4291285440 4293651690 4284782402 4283998248 4284063786 4284195372 4148921636 1612856336 302649860 3090571034 4283865642 4284129580 4284129580 4283930157 4289378465 4291218626 4284519486 4284064042 4284129580 4283865642 3090505498 302649604 2573587 907751437 3627904029 4283865642 4284195372 4284063275 4284060978 4284126260 4283996972 4284195372 4283865642 3627838237 890974221 2573330 263937 6533168 907817229 3124125722 4182476324 4283865386 4284063531 4284063531 4283865386 4182476324 3124125722 891040013 6335279 263937 0 0 1979406 319691015 1646476817 2939246103 3543687963 3543687963 2939246103 1646476817 319691015 1979406 0 0)
- 	fromArray: #( 3875602689 3875602689 3875602689 3875602689 3875602689 3875602689 0 0 0 0 3875602689 0 0 0 0 4127260929 3877181721 3877181721 3875602689 0 3875602689 0 0 0 0 3875602689 3212869760 0 3875602689 3212869760 3875602689 0 0 0 0 3875602689 3212869760 0 3875602689 3212869760 3875602689 0 0 0 0 3875602689 3212869760 0 3875602689 3212869760 3875602689 4127260929 3875602689 3875602689 3875602689 3875602689 3212869760 0 3875602689 3212869760 0 3877181721 3212869760 3212869760 3212869760 3212869760 3212869760 0 3875602689 3212869760 0 3877181721 0 0 0 0 0 0 3875602689 3212869760 0 3875602689 3875602689 3875602689 3875602689 3875602689 3875602689 3875602689 3875602689 3212869760 0 0 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760)
  	offset: 0 at 0) ]!

Item was added:
+ ----- Method: FillInTheBlankMorph class>>roundedDialogCorners (in category 'preferences') -----
+ roundedDialogCorners
+ 	<preference: 'Rounded Dialog Corners'
+ 		category: 'windows'
+ 		description: 'Governs whether dialog windows should have rounded corners'
+ 		type: #Boolean>
+ 	^ RoundedDialogCorners ifNil: [ true ]!

Item was changed:
  ----- Method: MenuMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	| colorFromMenu worldColor menuColor |
  	
  	colorFromMenu := Preferences menuColorFromWorld
  									and: [Display depth > 4
  									and: [(worldColor := self currentWorld color) isColor]].
  
  	menuColor := colorFromMenu
  						ifTrue: [worldColor luminance > 0.7
  										ifTrue: [worldColor mixed: 0.85 with: Color black]
  										ifFalse: [worldColor mixed: 0.4 with: Color white]]
  						ifFalse: [Preferences menuColor].
  
  	self color: menuColor.
  	self borderWidth: Preferences menuBorderWidth.
  
  	Preferences menuAppearance3d ifTrue: [
  		self borderStyle: BorderStyle thinGray.
  		self
  			addDropShadow;
+ 			shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.1);
+ 			shadowOffset: 5 @ 5
- 			shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666);
- 			shadowOffset: 1 @ 1
  	]
  	ifFalse: [
  		| menuBorderColor |
  		menuBorderColor := colorFromMenu
  										ifTrue: [worldColor muchDarker]
  										ifFalse: [Preferences menuBorderColor].
  		self borderColor: menuBorderColor.
  	].
  
  
+ 	self layoutInset: 6.
- 	self layoutInset: 3.
  !

Item was changed:
  ----- Method: MenuItemMorph>>minHeight (in category 'layout') -----
  minHeight
  	| iconHeight |
  	iconHeight := self hasIcon
  				ifTrue: [self icon height + 2]
  				ifFalse: [0].
+ 	^ self fontToUse height + 2 max: iconHeight!
- 	^(self fontToUse height max: iconHeight) + 2!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>windowColorsOn: (in category 'construction') -----
+ windowColorsOn: menu
+ 
+ 	menu addItem:[:item|
+ 		item
+ 			contents: 'Uniform Windows' translated;
+ 			help: 'Use uniform window colors' translated;
+ 			target: Preferences;
+ 			selector: #installUniformWindowColors].
+ 
+ 	menu addItem:[:item|
+ 		item
+ 			contents: 'Colorful Windows' translated;
+ 			help: 'Use bright window colors' translated;
+ 			target: Preferences;
+ 			selector: #installBrightWindowColors].
+ !

Item was changed:
  ----- Method: Morph>>drawDropShadowOn: (in category 'drawing') -----
  drawDropShadowOn: aCanvas
  
  	aCanvas 
  		translateBy: self shadowOffset 
  		during: [ :shadowCanvas |
  			shadowCanvas shadowColor: self shadowColor.
  			shadowCanvas roundCornersOf: self during: [ 
+ 				(shadowCanvas isVisible: self bounds) ifTrue:
+ 					[shadowCanvas fillRectangle: self bounds fillStyle: self fillStyle]]
- 				(shadowCanvas isVisible: self bounds) ifTrue:[shadowCanvas drawMorph: self ]]
  		].
  !

Item was added:
+ ----- Method: SystemWindowButton>>mouseLeave: (in category 'visual properties') -----
+ mouseLeave: evt
+ 
+ 	self restoreImage.
+ !

Item was changed:
  AbstractResizerMorph subclass: #CornerGripMorph
  	instanceVariableNames: 'target'
+ 	classVariableNames: 'ActiveForm DrawCornerResizeHandles PassiveForm'
- 	classVariableNames: 'ActiveForm PassiveForm'
  	poolDictionaries: ''
  	category: 'Morphic-Windows'!
  
  !CornerGripMorph commentStamp: 'jmv 1/29/2006 17:15' prior: 0!
  I am the superclass of a hierarchy of morph specialized in allowing the user to resize windows.!

Item was added:
+ ----- Method: SystemWindow class>>doubleClickOnLabelToExpand: (in category 'preferences') -----
+ doubleClickOnLabelToExpand: aBoolean
+ 
+ 	DoubleClickOnLabelToExpand := aBoolean.
+ 	self rebuildAllWindowLabels.
+ !

Item was changed:
  ----- Method: PasteUpMorph>>defaultColor (in category 'initialization') -----
  defaultColor
  	"answer the default color/fill style for the receiver"
+ 	^ Preferences defaultWorldColor muchLighter.!
- 	^ Color
- 		r: 0.8
- 		g: 1.0
- 		b: 0.6!

Item was added:
+ ----- Method: SystemWindow class>>moveMenuButtonRight: (in category 'preferences') -----
+ moveMenuButtonRight: aBoolean
+ 
+ 	| absLeftOffset |
+ 	absLeftOffset := ((self hideExpandButton and: [aBoolean])
+ 		ifTrue: [absLeftOffset := self boxExtent x * 2]
+ 		ifFalse: [absLeftOffset := self boxExtent x]) + 3.
+ 	self menuBoxFrame leftOffset: (aBoolean 
+ 										ifTrue: [absLeftOffset negated]
+ 										ifFalse: [absLeftOffset]).
+ 	self rebuildAllWindowLabels.!

Item was changed:
  ----- Method: SystemWindow>>createExpandBox (in category 'initialization') -----
  createExpandBox
+ 	^ (self createBox: self class expandBoxImage)
+ 		actionSelector: #expandBoxHit;
+ 		setBalloonText: 'expand to full screen' translated!
- 	^ self createBox 
- 		
- 		labelGraphic: self class expandBoxImage;
- 	
- 		 extent: self boxExtent;
- 		 actWhen: #buttonUp;
- 		 actionSelector: #expandBoxHit;
- 
- 		 setBalloonText: 'expand to full screen' translated!

Item was changed:
  ----- Method: SystemWindow>>createCollapseBox (in category 'initialization') -----
  createCollapseBox
+ 	^ (self createBox: self class collapseBoxImage)
+ 		actionSelector: #collapseOrExpand;
+ 		setBalloonText: 'collapse this window' translated.
- 	^ self createBox labelGraphic: self class collapseBoxImage;
- 		 extent: self boxExtent;
- 		 actionSelector: #collapseOrExpand;
- 		 setBalloonText: 'collapse this window' translated.
  !

Item was changed:
  ----- Method: SystemWindow>>initialize (in category 'initialization') -----
  initialize
  	"Initialize a system window. Add label, stripes, etc., if desired"
  	super initialize.
  	allowReframeHandles := true.
  	labelString ifNil: [labelString := 'Untitled Window'].
  	isCollapsed := false.
  	activeOnlyOnTop := true.
  	paneMorphs := Array new.
  	borderColor := Color lightGray.
  	borderWidth := 1.
+ 	self color: Color veryVeryLightGray muchLighter.
- 	self color: Color lightGray lighter lighter lighter.
  	self layoutPolicy: ProportionalLayout new.
  	
  	self initializeLabelArea.
  				
  	self addCornerGrips.
  
  	self extent: 300 @ 200.
  	mustNotClose := false.
  	updatablePanes := Array new.
  		
  	Preferences menuAppearance3d
  		ifTrue: [
  			self
  				addDropShadow;
  				shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.333);
  				shadowOffset: 1 at 1.
  		].
  					!

Item was changed:
  ----- Method: FillInTheBlankMorph>>setQuery:initialAnswer:answerExtent:acceptOnCR: (in category 'initialization') -----
  setQuery: queryString initialAnswer: initialAnswer answerExtent: answerExtent acceptOnCR: acceptBoolean 
  	| query topOffset accept cancel buttonAreaHeight |
  	response := initialAnswer.
  	done := false.
  	self removeAllMorphs.
  	self layoutPolicy: ProportionalLayout new.
  	query := self createQueryTextMorph: queryString.
  	topOffset := query height + 4.
  	accept := self createAcceptButton.
  	cancel := self createCancelButton.
  	buttonAreaHeight := (accept height max: cancel height)
+ 				+ 7.
- 				+ 4.
  	textPane := self
  				createTextPaneExtent: answerExtent
  				acceptBoolean: acceptBoolean
  				topOffset: topOffset
  				buttonAreaHeight: buttonAreaHeight.
  	self extent: (query extent x max: answerExtent x)
  			+ 4 @ (topOffset + answerExtent y + 4 + buttonAreaHeight).
  	!

Item was changed:
  ----- Method: SystemWindow>>createCloseBox (in category 'initialization') -----
  createCloseBox
+ 	^ (self createBox: self class closeBoxImage)
+ 		actionSelector: #closeBoxHit;
+ 		setBalloonText: 'close this window' translated!
- 	^ self createBox labelGraphic: self class closeBoxImage;
- 		 extent: self boxExtent;
- 		 actionSelector: #closeBoxHit;
- 		 setBalloonText: 'close this window' translated!

Item was added:
+ ----- Method: ProportionalSplitterMorph>>layoutChanged (in category 'layout') -----
+ layoutChanged	
+ 	
+ 	super layoutChanged.
+ 	handle ifNotNil: [handle position: self bounds center - (2 at 2)]!

Item was changed:
  ----- Method: SystemWindow class>>closeBoxImage (in category 'initializing') -----
  closeBoxImage
  	"Supplied here because we don't necessarily have ComicBold"
  
  	^ CloseBoxImage ifNil: [CloseBoxImage := (Form
+ 	extent: 14 at 14
- 	extent: 10 at 10
  	depth: 32
+ 	fromArray: #(0 0 6032910 288687365 1550655006 2844865845 3450028610 3450028610 2828088372 1550655006 288687365 5967374 0 0 1377027 15091784 844830230 3063889984 4158092147 4294153621 4294681250 4294681250 4294153364 4158091376 3047046718 844764694 14763847 1376770 7742243 861541910 3585164870 4294282123 4294943908 4294943908 4294943651 4294943651 4294943908 4294943908 4294216330 3585099848 844764694 7676450 288098055 3047109684 4294211447 4294939539 4293757578 4293363848 4294939025 4294939282 4293954186 4293560456 4294939539 4294212732 3047110455 288031748 1584209695 4158081610 4294932343 4293753466 4291733929 4291802549 4293164156 4293884281 4291666594 4291670192 4293294457 4294933885 4158018130 1567432222 2861706541 4294136145 4294924376 4292761945 4292198592 4294704894 4292064950 4291403679 4294375158 4293057499 4291846497 4294925147 4294136659 2844863789 3483644980 4294660947 4294923605 4294857555 4292566879 4292658886 4294770173 4294704380 4293452000 4291981681 4294595154 4294923605 4294660947 3466867764 3500422196 4294726483 4294923605 4294923605 4293742415 4291402908 4294836223 4294967295 4292198592 4292760660 4294923348 4294923605 4294660947 3483644980 2878484014 4294136145 4294923605 4293939794 4291728018 4294375158 4293452257 4292793042 4294704637 4292128944 4293154390 4294923605 4294136145 2878484014 1617830177 4174923591 4294923862 4292957011 4292000442 4293386721 4291915888 4292238685 4292659400 4292595406 4292303450 4294923605 4158146375 1617829920 305072650 3097572147 4294267217 4294923348 4292631901 4291781989 4294595154 4294857555 4292435036 4292238942 4294857812 4294267217 3097506611 305007114 8070437 912005658 3635624249 4294333010 4294923605 4294857555 4294923605 4294923605 4294923348 4294923348 4294333010 3635624249 895228442 8004901 1639428 16735838 912071451 3131126579 4191766343 4294267217 4294726740 4294726740 4294201681 4191766343 3131126579 895293978 16735067 1573892 0 0 6888733 322506254 1651515681 2945723950 3550885173 3550885173 2945723950 1651515681 322440718 6822940 0 0)
- 	fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 3326099520 3330310272 0 0 0 0 0 0 0 0 4144038145 3326099520 3330310272 0 0 0 4144038145 3326099520 0 0 0 4227924225 3326099520 3330310272 0 4144038145 3326099520 3330310272 0 0 0 0 4144038145 3326099520 4144038145 3326099520 3330310272 3336494814 0 0 0 0 0 4227924225 3326099520 3330310272 3336494814 0 0 0 0 0 4144038145 3326099520 4144038145 3326099520 3330310272 3336494814 0 0 0 4144038145 3326099520 3330310272 3336494814 4144038145 3326099520 3330310272 0 0 4144038145 3326099520 3330310272 3336494814 0 0 4144038145 3326099520 0 0 0 3330310272 3336494814 0 0 0 0 0 0)
  	offset: 0 at 0)]!

Item was added:
+ ----- Method: SystemWindow class>>moveMenuButtonRight (in category 'preferences') -----
+ moveMenuButtonRight
+ 
+ 	<preference: 'Move Menu Button Right'
+ 		category: 'windows'
+ 		description: 'Moves the menu to the right side of the window label area, while traditionally it used to be on the left side'
+ 		type: #Boolean>
+ 	^ self menuBoxFrame leftOffset negative
+ !

Item was changed:
  ----- Method: SystemWindow>>addExpandBox (in category 'initialization') -----
  addExpandBox
  	"If I have a labelArea, add a close box to it"
+ 	
+ 	labelArea ifNil: [^ self].
+ 	self class hideExpandButton ifTrue: [^ self].
+ 	expandBox ifNotNil: [expandBox delete].
- 	| frame |
- 	labelArea
- 		ifNil: [^ self].
  	expandBox := self createExpandBox.
+ 	expandBox layoutFrame: self class expandBoxFrame.
- 	frame := LayoutFrame new.
- 	frame leftFraction: 1;
- 		 leftOffset: (self boxExtent x * 2 + 3) negated;
- 		 topFraction: 0;
- 		 topOffset: 0.
- 	expandBox layoutFrame: frame.
  	labelArea addMorphBack: expandBox!

Item was changed:
  ----- Method: LazyListMorph>>drawSelectionOn: (in category 'drawing') -----
  drawSelectionOn: aCanvas
  	
  	| selectionDrawBounds |
  	selectedRow ifNil: [ ^self ].
  	selectedRow = 0 ifTrue: [ ^self ].
  	selectionDrawBounds := self drawBoundsForRow: selectedRow.
  	selectionDrawBounds := selectionDrawBounds intersect: self bounds.
+ 	aCanvas fillRectangle: selectionDrawBounds color: self class listSelectionColor.!
- 	aCanvas fillRectangle: selectionDrawBounds color: (Preferences menuSelectionColor)!

Item was added:
+ ----- Method: SystemWindow class>>menuBoxFrame (in category 'preferences') -----
+ menuBoxFrame
+ 
+ 	^ MenuBoxFrame ifNil: [
+ 		MenuBoxFrame := (LayoutFrame new
+ 								leftFraction: 0;
+ 								leftOffset: self boxExtent x + 3;
+ 								topFraction: 0;
+ 								topOffset: 0;
+ 								yourself)]!

Item was added:
+ ----- Method: SystemWindow>>addLabel (in category 'label') -----
+ addLabel
+ 
+ 	(labelArea isNil or: [label isNil]) ifTrue: [^ self].
+ 	labelArea 
+ 		addMorphBack: (Morph new extent: self class borderWidth @ 0);
+ 		addMorphBack: label.
+ 	label on: #startDrag send: #startDragFromLabel: to: self.
+ 	self class clickOnLabelToEdit
+ 		ifTrue: [label on: #mouseUp send: #relabel to: self].
+ 	self class doubleClickOnLabelToExpand
+ 		ifTrue: [label on: #doubleClick send: #expandBoxHit to: self].!

Item was changed:
  ----- Method: ProportionalSplitterMorph>>mouseMove: (in category 'events') -----
  mouseMove: anEvent 
  	anEvent hand temporaryCursor
  		ifNil: [^ self].
  	self class fastSplitterResize
  		ifFalse:  [self updateFromEvent: anEvent]
  		ifTrue: [traceMorph
  				ifNil: [traceMorph := Morph newBounds: self bounds.
+ 					traceMorph color: (Color gray alpha: 0.5).
+ 					traceMorph borderWidth: 0.
- 					traceMorph borderColor: Color lightGray.
- 					traceMorph borderWidth: 1.
  					self owner addMorph: traceMorph].
  			splitsTopAndBottom
  				ifTrue: [traceMorph position: traceMorph position x @ (self normalizedY: anEvent cursorPoint y)]
  				ifFalse: [traceMorph position: (self normalizedX: anEvent cursorPoint x) @ traceMorph position y]]!

Item was added:
+ ----- Method: SystemWindow class>>clickOnLabelToEdit (in category 'preferences') -----
+ clickOnLabelToEdit
+ 
+ 	<preference: 'Click On Label To Edit'
+ 		category: 'windows'
+ 		description: 'If true, a click on the label of a system window lets you edit it'
+ 		type: #Boolean>
+ 	^ ClickOnLabelToEdit ifNil: [false].
+ !

Item was added:
+ IconicButton subclass: #SystemWindowButton
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Morphic-Windows'!

Item was added:
+ ----- Method: LazyListMorph class>>listSelectionColor: (in category 'preferences') -----
+ listSelectionColor: aColor
+ 
+ 	ListSelectionColor := aColor.
+ 	World invalidRect: World bounds from: World.!

Item was added:
+ ----- Method: SystemWindowButton>>mouseEnter: (in category 'visual properties') -----
+ mouseEnter: evt
+ 
+ 	self highlight.
+ !

Item was changed:
  ----- Method: SystemWindow class>>collapseBoxImage (in category 'initializing') -----
  collapseBoxImage
  	"Supplied here because we don't necessarily have ComicBold"
  
+ 	^ CollapseBoxImage ifNil: [CollapseBoxImage := (Form
+ 	extent: 14 at 14
- 	^ CollapseBoxImage ifNil: [ CollapseBoxImage := (Form
- 	extent: 10 at 10
  	depth: 32
+ 	fromArray: #(0 0 5854464 288568064 1550541582 2844754727 3449983798 3449983798 2827977511 1550541581 288568064 5788928 0 0 1251328 15059494 844715013 3063844916 4158047598 4294173075 4294699425 4294699425 4294172818 4158047339 3047001906 844715013 14730789 1251328 7695120 861426436 3585122108 4294238345 4294963108 4294962852 4294962595 4294962595 4294962852 4294963108 4294238345 3585056574 844649220 7629583 287911168 3047067176 4294237302 4294962067 4294961553 4294961553 4294961553 4294961553 4294961553 4294961810 4294962068 4294237563 3047067180 287910912 1584096270 4158045509 4294960759 4294960767 4294961024 4294961025 4294961025 4294961024 4294961023 4294960763 4294960505 4294961022 4158045773 1567318796 2861597216 4294169679 4294958680 4294235481 4293972830 4294038626 4294038626 4294038367 4294038106 4293972308 4294103635 4294892891 4294169682 2844820000 3483603497 4294761043 4294498129 4291279233 4292465594 4292465592 4292465592 4292465592 4292465592 4292531386 4291346328 4293643602 4294826835 3466826281 3500380713 4294761299 4294366544 4291675295 4294112246 4294111987 4294111987 4294111987 4294111987 4294243574 4292203203 4293446228 4294826835 3483603497 2878440481 4294169679 4294826836 4292526427 4292395625 4292395625 4292395625 4292395625 4292395625 4292395626 4292263777 4294366803 4294235215 2878440225 1617716496 4174888258 4294958934 4294958676 4294958675 4294958675 4294958675 4294958675 4294958675 4294958675 4294958676 4294959190 4158111042 1617716496 304951552 3097530152 4294301264 4294958677 4294958421 4294958421 4294958421 4294958421 4294958421 4294958421 4294958677 4294301264 3097464616 304886016 7958548 911889929 3635584561 4294366800 4294958934 4294958677 4294958421 4294958421 4294958677 4294958934 4294366800 3635584561 895112713 7892755 1514752 16775998 911955722 3131084841 4191796803 4294235216 4294761299 4294761299 4294235216 4191796803 3131084840 895178506 16774203 1448960 0 0 6710533 322386432 1651402770 2945615139 3550843947 3550843947 2945615139 1651402770 322320896 6644741 0 0)
- 	fromArray: #( 0 0 4127260929 4127260929 4127260929 4127260929 4127260929 0 0 0 0 3875602689 3212869760 3212869760 3212869760 3212869760 3212869760 4227924225 0 0 4127260929 3212869760 3212869760 0 0 0 0 3212869760 4127260929 0 4127260929 3212869760 0 0 0 0 0 0 4127260929 3212869760 4127260929 3212869760 0 0 0 0 0 0 4127260929 3212869760 4127260929 3212869760 0 0 0 0 0 0 4127260929 3212869760 4128708375 3212869760 0 0 0 0 0 0 4127260929 3212869760 0 4127260929 3212869760 0 0 0 0 4127260929 3208659008 3212869760 0 3208659008 4127260929 4127260929 4127260929 4127260929 4127260929 3208659008 3212869760 0 0 0 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 0 0)
  	offset: 0 at 0)]!

Item was changed:
  ----- Method: CornerGripMorph>>drawOn: (in category 'drawing') -----
  drawOn: aCanvas
  
+ 	self class drawCornerResizeHandles
+ 		ifTrue: [
+ 			bounds := self bounds.
+ 			aCanvas 
+ 				translucentImage: (self alphaHandle) 
+ 				at: (bounds origin ) 
+ 				sourceRect: (self handleOrigin extent: bounds extent)]!
- 	bounds := self bounds.
- 	aCanvas 
- 		translucentImage: (self alphaHandle) 
- 		at: (bounds origin ) 
- 		sourceRect: (self handleOrigin extent: bounds extent )!

Item was added:
+ ----- Method: SystemWindow>>refreshWindowColor (in category 'initialization') -----
+ refreshWindowColor
+ 	"For changing the underlying model's default window color"
+ 	self paneColor: nil.
+ 	self setWindowColor: self paneColor.!

Item was added:
+ ----- Method: SystemWindow class>>hideExpandButton: (in category 'preferences') -----
+ hideExpandButton: aBoolean
+ 
+ 	HideExpandButton := aBoolean.
+ 	"Have the menu button frame rebuilt accordingly"
+ 	self moveMenuButtonRight: self moveMenuButtonRight.
+ !

Item was changed:
  ----- Method: SystemWindow>>addCloseBox (in category 'initialization') -----
  addCloseBox
  	"If I have a labelArea, add a close box to it"
+ 
- 	| frame |
  	labelArea
  		ifNil: [^ self].
+ 	closeBox ifNotNil: [closeBox delete].
  	closeBox := self createCloseBox.
+ 	closeBox layoutFrame: self class closeBoxFrame.
- 	frame := LayoutFrame new.
- 	frame leftFraction: 0;
- 		 leftOffset: 2;
- 		 topFraction: 0;
- 		 topOffset: 0.
- 	closeBox layoutFrame: frame.
  	labelArea addMorphFront: closeBox!

Item was changed:
  ----- Method: SystemWindow>>defaultBorderWidth (in category 'initialization') -----
  defaultBorderWidth
  	"answer the default border width for the receiver"
  	^ 2.!

Item was added:
+ ----- Method: SystemWindowButton>>updateVisualState: (in category 'visual properties') -----
+ updateVisualState: evt
+ 
+ 	(self containsPoint: evt cursorPoint)
+ 		ifTrue: [self darken]
+ 		ifFalse: [self restoreImage].
+ !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>extrasMenuOn: (in category 'construction') -----
  extrasMenuOn: aDockingBar 
  
  	aDockingBar addItem: [ :it|
  		it 	contents: 'Extras' translated;
  			addSubMenu: [:menu|
  				menu addItem:[:item|
  					item
  						contents: 'Recover Changes' translated;
  						help: 'Recover changes after a crash' translated;
  						icon: MenuIcons smallHelpIcon;
  						target: ChangeList;
  						selector: #browseRecentLog].
  				menu addLine.
  				menu addItem:[:item|
  					item
+ 						contents: 'Window Colors' translated;
+ 						help: 'Changes the window color scheme' translated;
+ 						addSubMenu:[:submenu| self windowColorsOn: submenu]].
+ 				menu addItem:[:item|
+ 					item
  						contents: 'Set Author Initials' translated;
  						help: 'Sets the author initials' translated;
  						target: Utilities;
  						selector: #setAuthorInitials].
  				menu addItem:[:item|
  					item
  						contents: 'Restore Display (r)' translated;
  						help: 'Redraws the entire display' translated;
  						target: World;
  						selector: #restoreMorphicDisplay].
  				menu addItem:[:item|
  					item
  						contents: 'Rebuild Menus' translated;
  						help: 'Rebuilds the menu bar' translated;
  						target: TheWorldMainDockingBar;
  						selector: #updateInstances].
  				menu addLine.
  				menu addItem:[:item|
  					item
  						contents: 'Start Profiler' translated;
  						help: 'Starts the profiler' translated;
  						target: self;
  						selector: #startMessageTally].
  				menu addItem:[:item|
  					item
  						contents: 'Collect Garbage' translated;
  						help: 'Run the garbage collector and report space usage' translated;
  						target: Utilities;
  						selector: #garbageCollectAndReport].
  				menu addItem:[:item|
  					item
  						contents: 'VM statistics' translated;
  						help: 'Virtual Machine information' translated;
  						target: self;
  						selector: #vmStatistics].
  			] ]!

Item was changed:
  ----- Method: SystemWindow>>gradientWithColor: (in category 'initialization') -----
  gradientWithColor: aColor
  
  	| gradient |
  	gradient := GradientFillStyle ramp: {
  		0.0 -> Color white. 
+ 		0.2 -> (aColor mixed: 0.5 with: (Color gray: 0.9)) lighter. 
- 		0.33 ->(aColor mixed: 0.5 with: Color white). 
  		1.0 -> aColor.
  	}.
  	gradient origin: self topLeft.
  	gradient direction: 0 @ self labelHeight.
  	^gradient!

Item was changed:
  ----- Method: PluggableButtonMorph>>defaultColor (in category 'initialization') -----
  defaultColor
  	"answer the default color/fill style for the receiver"
+ 	^ Color gray: 0.7!
- 	^ Color lightGreen!

Item was changed:
  ----- Method: FillInTheBlankMorph>>initialize (in category 'initialization') -----
  initialize
  
  	super initialize.
  	self setDefaultParameters.
  	self extent: 400 @ 150.
  	responseUponCancel := ''.
+ 	self class roundedDialogCorners ifTrue: [self useRoundedCorners].
- 	Preferences roundedMenuCorners
- 		ifTrue: [self useRoundedCorners].
  	!

Item was changed:
  ----- Method: IconicButton>>labelGraphic: (in category 'as yet unclassified') -----
  labelGraphic: aForm
  	| oldLabel graphicalMorph |
  	(oldLabel := self findA: SketchMorph)
  		ifNotNil: [oldLabel delete].
  	graphicalMorph := SketchMorph withForm: aForm.
  	self extent: graphicalMorph extent + (borderWidth + 6).
  	graphicalMorph position: self center - (graphicalMorph extent // 2).
  	self addMorph: graphicalMorph.
+ 	graphicalMorph 
+ 		baseGraphic;
+ 		lock.
- 	graphicalMorph lock
  !

Item was added:
+ ----- Method: SystemWindowButton>>handlesMouseOver: (in category 'visual properties') -----
+ handlesMouseOver: evt
+ 
+ 	^ true
+ !

Item was changed:
  ----- Method: SystemWindow>>replaceBoxes (in category 'initialization') -----
  replaceBoxes
  	"Rebuild the various boxes."
  	self setLabelWidgetAllowance.
+ 	label ifNotNil: [label delete].
+ 	labelArea ifNotNil: [labelArea delete].
+ 	self initializeLabelArea.
- 	closeBox ifNotNil: [ :m | m delete. self addCloseBox. ].
- 	expandBox ifNotNil: [ :m | m delete. self addExpandBox. ].
- 	menuBox ifNotNil: [ :m | m delete. self addMenuControl. ].
- 	collapseBox ifNotNil: [ :m | m delete. labelArea addMorph: (collapseBox := self createCollapseBox) ].
  	self setFramesForLabelArea.
+ 	self setWindowColor: self paneColor.
+ 	self isActive ifFalse: [self passivate].!
- 	self setWindowColor: self paneColor !

Item was added:
+ ----- Method: SystemWindow>>startDragFromLabel: (in category 'events') -----
+ startDragFromLabel: evt
+ 	"When label events are active, we need to pass dragging to the window explicitely
+ 	 The window only recognizes a drag with an offset of more than 3 pixels"
+ 	
+ 	self setProperty: #clickPoint toValue: evt cursorPoint - 4.
+ 	self mouseMove: evt.!

Item was added:
+ ----- Method: SystemWindow class>>doubleClickOnLabelToExpand (in category 'preferences') -----
+ doubleClickOnLabelToExpand
+ 
+ 	<preference: 'Double-Click On Label To Expand'
+ 		category: 'windows'
+ 		description: 'Activates expansion through double-clicking on the window label area. This mimics the behavior in many current operating systems'
+ 		type: #Boolean>
+ 	^ DoubleClickOnLabelToExpand ifNil: [true].
+ !

Item was added:
+ ----- Method: IconicButton>>restoreImage (in category 'as yet unclassified') -----
+ restoreImage
+ 
+ 	self firstSubmorph restoreBaseGraphic.!

Item was added:
+ ----- Method: CornerGripMorph class>>drawCornerResizeHandles: (in category 'preferences') -----
+ drawCornerResizeHandles: aBoolean
+ 	
+ 	DrawCornerResizeHandles := aBoolean.
+ 	World invalidRect: World bounds from: World.!

Item was changed:
  ----- Method: ProportionalSplitterMorph>>initialize (in category 'initialization') -----
  initialize
  
  	super initialize.
  	
  	self hResizing: #spaceFill.
  	self vResizing: #spaceFill.
  	splitsTopAndBottom := false.
  	
  	leftOrTop := OrderedCollection new.
+ 	rightOrBottom := OrderedCollection new.
+ 	
+ 	Preferences showSplitterHandles 
+ 		ifTrue: [
+ 			handle := CircleMorph new
+ 					borderWidth: 0;
+ 					extent: 4 at 4;
+ 					yourself.
+ 			handle fillStyle: ((GradientFillStyle 
+ 						ramp: {0.0 -> Preferences defaultWindowColor muchLighter. 
+ 							1.0 -> Preferences defaultWindowColor darker})
+ 						origin: handle topLeft;
+ 						direction: 0 @ handle bounds extent y;
+ 						normal: handle bounds extent x @ 0;
+ 						radial: false;
+ 						yourself).
+ 			self addMorphCentered: handle].!
- 	rightOrBottom := OrderedCollection new!

Item was changed:
  ----- Method: LazyListMorph>>colorForRow: (in category 'drawing') -----
  colorForRow: row
  	
  	^(selectedRow notNil and: [ row = selectedRow])
+ 		ifTrue: [ self class listSelectionTextColor ]
- 		ifTrue: [ self color negated ]
  		ifFalse: [ self color ].!

Item was added:
+ ----- Method: PluggableButtonMorph class>>roundedButtonCorners: (in category 'preferences') -----
+ roundedButtonCorners: aBoolean
+ 
+ 	RoundedButtonCorners := aBoolean.
+ 	World invalidRect: World bounds from: World.!

Item was added:
+ ----- Method: SystemWindow class>>expandBoxFrame (in category 'preferences') -----
+ expandBoxFrame
+ 
+ 	^ ExpandBoxFrame ifNil: [
+ 		ExpandBoxFrame := (LayoutFrame new
+ 								leftFraction: 1;
+ 								leftOffset: (self boxExtent x * 2 + 3) negated;
+ 								topFraction: 0;
+ 								topOffset: 0;
+ 								yourself)]!

Item was added:
+ ----- Method: PluggableButtonMorph class>>roundedButtonCorners (in category 'preferences') -----
+ roundedButtonCorners
+ 	<preference: 'Rounded Button Corners'
+ 		category: 'windows'
+ 		description: 'Governs whether pluggable buttons in system windows should be rounded'
+ 		type: #Boolean>
+ 	^ RoundedButtonCorners ifNil: [ true ]!

Item was changed:
  MorphicModel subclass: #SystemWindow
  	instanceVariableNames: 'labelString stripes label closeBox collapseBox activeOnlyOnTop paneMorphs paneRects collapsedFrame fullFrame isCollapsed menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox'
+ 	classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImage CollapseBoxImage DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImage HideExpandButton MenuBoxFrame MenuBoxImage ReuseWindows TopWindow'
- 	classVariableNames: 'CloseBoxImage CollapseBoxImage ExpandBoxImage MenuBoxImage ReuseWindows TopWindow'
  	poolDictionaries: ''
  	category: 'Morphic-Windows'!
  
  !SystemWindow commentStamp: '<historical>' prior: 0!
  SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing.
  
  The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active.  To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.!

Item was changed:
  ----- Method: TheWorldMainDockingBar class>>initialize (in category 'class initialization') -----
  initialize
  	" self initialize "
  	
  	Locale addLocalChangedListener: self.
  	self updateInstances.!

Item was changed:
  ----- Method: SystemWindow>>wantsExpandBox (in category 'resize/collapse') -----
  wantsExpandBox
  	"Answer whether I'd like an expand box"
  
+ 	^ Preferences alwaysHideExpandButton not!
- 	^ true!

Item was changed:
  ----- Method: SystemWindow class>>menuBoxImage (in category 'initializing') -----
  menuBoxImage
  
+ 	^ MenuBoxImage ifNil: [MenuBoxImage := (Form
+ 	extent: 14 at 14
- 	^ MenuBoxImage ifNil: [(Form
- 	extent: 10 at 10
  	depth: 32
+ 	fromArray: #(0 0 7774 285216318 1544039783 2837267842 3442168720 3442168720 2820490625 1544039782 285216574 7774 0 0 2087 1532860 839001178 3056161165 4150166716 4286817494 4287738079 4287803615 4286751958 4150035131 3039252364 839001178 1467065 1831 668526 855712858 3576584601 4286029012 4287935459 4287935458 4287869666 4287869666 4287935458 4287869923 4285963476 3576715929 838935642 602733 285216827 3038463881 4284517582 4286621149 4286489564 4286489564 4286489564 4286489564 4286489564 4286489820 4286621149 4284911823 3038726794 285216058 1577594471 4147012271 4284387029 4284978391 4285043927 4285109719 4285109719 4285044183 4284978135 4284649685 4284518357 4284912599 4147603633 1560751463 2853453696 4281560257 4281888189 4283200687 4284186808 4284515256 4284515257 4284252600 4283858102 4283529653 4282740653 4282151359 4281757378 2836676480 3474606220 4281757894 4281559740 4285761703 4292993507 4293454315 4293388522 4293388522 4293454315 4292862177 4285432998 4281494205 4281692102 3457829004 3491383436 4281757638 4281758153 4281953722 4288589251 4294835708 4294967295 4294967295 4294769659 4288194752 4281887931 4281823689 4281692102 3474606220 2870296704 4281560257 4281823689 4281758153 4282215861 4289838026 4294967294 4294967038 4289377991 4282084534 4281758153 4281823689 4281560257 2870296704 1611280232 4163592111 4281823946 4281823688 4281692360 4282740914 4291152852 4290758353 4282544051 4281692361 4281823688 4281823946 4146749358 1611214696 301994814 3088664202 4281626050 4281823689 4281823688 4281692103 4282937773 4282806447 4281692360 4281823688 4281823689 4281626050 3088664202 301994814 734577 906307420 3625930390 4281626050 4281823946 4281823689 4281692360 4281692360 4281823689 4281823946 4281626050 3625930390 889530204 734576 2347 2392036 906373213 3122218634 4180369583 4281560257 4281757638 4281757638 4281560257 4180369583 3122218634 889595997 2325471 2346 0 3 76907 318773060 1644834921 2937405569 3541780621 3541780621 2937405569 1644834921 318773059 76906 2 0)
- 	fromArray: #( 4227858432 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4227858432 0 4127195136 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 4127195136 3212869760 4127195136 3212869760 0 0 0 0 0 0 4127195136 3212869760 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 3212869760 4127195136 3212869760 0 0 0 0 0 0 4127195136 3212869760 4127195136 3212869760 0 0 0 0 0 0 4127195136 3212869760 4227858432 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 3212869760 4127195136 3212869760 0 0 0 0 0 0 4127195136 3212869760 4227858432 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4127195136 4227858432 3212869760 0 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760 3212869760)
  	offset: 0 at 0)]!

Item was changed:
  ----- Method: FillInTheBlankMorph>>createTextPaneExtent:acceptBoolean:topOffset:buttonAreaHeight: (in category 'initialization') -----
  createTextPaneExtent: answerExtent acceptBoolean: acceptBoolean topOffset: topOffset buttonAreaHeight: buttonAreaHeight 
  	"create the textPane"
  	| result frame |
  	result := PluggableTextMorph
  				on: self
  				text: #response
  				accept: #response:
  				readSelection: #selectionInterval
  				menu: #codePaneMenu:shifted:.
+ 	result 
+ 		extent: answerExtent;
+ 		alwaysShowScrollBars: false;
+ 		hResizing: #spaceFill;
+ 		vResizing: #spaceFill;
+ 		borderWidth: 1;
+ 		hasUnacceptedEdits: true;
+ 		acceptOnCR: acceptBoolean;
+ 		setNameTo: 'textPane'.
+ 	frame := LayoutFrame new
+ 				leftFraction: 0.0;
+ 		 		rightFraction: 1.0;
+ 		 		topFraction: 0.0;
+ 		 		topOffset: topOffset;
+ 		 		bottomFraction: 1.0;
+ 		 		bottomOffset: buttonAreaHeight negated;
+ 				yourself.
- 	result extent: answerExtent.
- 	result hResizing: #spaceFill;
- 		 vResizing: #spaceFill.
- 	result borderWidth: 1.
- 	result hasUnacceptedEdits: true.
- 	result acceptOnCR: acceptBoolean.
- 	result setNameTo: 'textPane'.
- 	frame := LayoutFrame new.
- 	frame leftFraction: 0.0;
- 		 rightFraction: 1.0;
- 		 topFraction: 0.0;
- 		 topOffset: topOffset;
- 		 bottomFraction: 1.0;
- 		 bottomOffset: buttonAreaHeight negated.
  	result layoutFrame: frame.
  	self addMorph: result.
  	^ result!

Item was changed:
  RectangleMorph subclass: #FillInTheBlankMorph
  	instanceVariableNames: 'response done textPane responseUponCancel'
+ 	classVariableNames: 'RoundedDialogCorners'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Windows'!

Item was added:
+ ----- Method: FillInTheBlankMorph class>>roundedDialogCorners: (in category 'preferences') -----
+ roundedDialogCorners: aBoolean
+ 	
+ 	RoundedDialogCorners := aBoolean.
+ 	self allInstances do: [:instance | 
+ 		aBoolean 
+ 			ifTrue: [instance useRoundedCorners]
+ 			ifFalse: [instance useSquareCorners]].!

Item was added:
+ ----- Method: LazyListMorph class>>listSelectionTextColor: (in category 'preferences') -----
+ listSelectionTextColor: aColor
+ 	
+ 	ListSelectionTextColor := aColor.
+ 	World invalidRect: World bounds from: World.!

Item was changed:
  ----- Method: MenuMorph>>addTitle:icon:updatingSelector:updateTarget: (in category 'construction') -----
  addTitle: aString icon: aForm updatingSelector: aSelector updateTarget: aTarget 
  	"Add a title line at the top of this menu Make aString its initial  
  	contents.  
  	If aSelector is not nil, then periodically obtain fresh values for  
  	its  
  	contents by sending aSelector to aTarget.."
  	| title titleContainer |
  	title := AlignmentMorph newColumn.
  	self setTitleParametersFor: title.
  	""
  	aForm isNil
  		ifTrue: [titleContainer := title]
  		ifFalse: [| pair | 
  			pair := AlignmentMorph newRow.
  
  			pair color: Color transparent.
  			pair hResizing: #shrinkWrap.
  			pair layoutInset: 0.
  			""
  			pair addMorphBack: aForm asMorph.
  			""
  			titleContainer := AlignmentMorph newColumn.
  			titleContainer color: Color transparent.
  			titleContainer vResizing: #shrinkWrap.
  			titleContainer wrapCentering: #center.
  			titleContainer cellPositioning: #topCenter.
  			titleContainer layoutInset: 0.
  			pair addMorphBack: titleContainer.
  			""
  			title addMorphBack: pair].
  	""
  	aSelector
  		ifNil: [""
  			aString asString
+ 				linesDo: [:line | titleContainer 
+ 					addMorphBack: ((StringMorph 
+ 										contents: line 
+ 										font: Preferences standardMenuFont)
+ 										color: (Color gray: 0.5);
+ 										yourself)]]
- 				linesDo: [:line | titleContainer
- 						addMorphBack: (StringMorph contents: line font: Preferences standardMenuFont)]]
  		ifNotNil: [| usm | 
  			usm := UpdatingStringMorph on: aTarget selector: aSelector.
  			usm font: Preferences standardMenuFont.
  			usm useStringFormat.
  			usm lock.
  			titleContainer addMorphBack: usm].
  	""
  	title setProperty: #titleString toValue: aString.
  	self addMorphFront: title.
  	""
  	title useSquareCorners.
  	(self hasProperty: #needsTitlebarWidgets)
  		ifTrue: [self addStayUpIcons]!

Item was added:
+ ----- Method: LazyListMorph class>>listSelectionColor (in category 'preferences') -----
+ listSelectionColor
+ 	<preference: 'List Selection Color'
+ 		category: 'colors'
+ 		description: 'Governs the selection background in lists'
+ 		type: #Color>
+ 	^ ListSelectionColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9]!

Item was changed:
  ----- Method: SystemWindow>>addMenuControl (in category 'initialization') -----
  addMenuControl
  	"If I have a label area, add a menu control to it."
+ 	
+ 	labelArea ifNil: [^ self].
- 	| frame |
- 	labelArea
- 		ifNil: [^ self].
  	"No menu if no label area"
+ 	menuBox ifNotNil: [menuBox delete].
- 	menuBox
- 		ifNotNil: [menuBox delete].
  	menuBox := self createMenuBox.
+ 	menuBox layoutFrame: self class menuBoxFrame.
- 	frame := LayoutFrame new.
- 	frame leftFraction: 0;
- 		 leftOffset: closeBox right + 3;
- 		 topFraction: 0;
- 		 topOffset: 0.
- 	menuBox layoutFrame: frame.
  	labelArea addMorphBack: menuBox!

Item was added:
+ ----- Method: LazyListMorph class>>listSelectionTextColor (in category 'preferences') -----
+ listSelectionTextColor
+ 	<preference: 'List Selection Text Color'
+ 		category: 'colors'
+ 		description: 'Governs the color of selected text in lists'
+ 		type: #Color>
+ 	^ ListSelectionTextColor ifNil: [Color black]!

Item was added:
+ ----- Method: CornerGripMorph class>>drawCornerResizeHandles (in category 'preferences') -----
+ drawCornerResizeHandles
+ 	<preference: 'Draw Corner Resize Handles'
+ 		category: 'windows'
+ 		description: 'Governs the resize handles on windows should be drawn. This does not disable them'
+ 		type: #Boolean>
+ 	^ DrawCornerResizeHandles ifNil: [ false ]!

Item was changed:
  ----- Method: PluggableButtonMorph>>drawOn: (in category 'drawing') -----
  drawOn: aCanvas 
  	| cc gradient |
  	cc := self color.
  	cc isTransparent ifTrue:[cc := Color gray: 0.9].
  	self enabled ifFalse:[cc := Color lightGray].
  	cc brightness > 0.9 ifTrue:[cc := cc adjustBrightness: 0.9 - cc brightness].
  	showSelectionFeedback ifTrue:[
  		gradient := GradientFillStyle ramp: {
  			0 -> (Color gray: 0.75).
  			0.5 -> (Color gray: 0.85).
  			0.51 -> (Color gray: 0.9).
  			1 -> (Color gray: 1).
  		}.
  	] ifFalse:[
  		gradient := GradientFillStyle ramp: {
  			0.0 -> Color white.
  			0.5 -> (cc).
  			0.51-> (cc adjustBrightness: -0.1).
  			1 -> (Color gray: 0.95).
  		}
  	].
  	gradient origin: bounds topLeft.
  	gradient direction: 0 at self height.
+ 	^ self class roundedButtonCorners
+ 		ifTrue: [aCanvas frameAndFillRoundRect: bounds radius: 8 fillStyle: gradient borderWidth: 1 borderColor: Color lightGray]
+ 		ifFalse: [
+ 			aCanvas 
+ 					frameAndFillRectangle: self innerBounds fillColor: gradient asColor borderWidth: 1 borderColor: Color gray;
+ 					fillRectangle: (self innerBounds insetBy: 1) fillStyle: gradient]!
- 	^aCanvas frameAndFillRoundRect: bounds radius: 8 fillStyle: gradient borderWidth: 1 borderColor: Color lightGray.!

Item was added:
+ ----- Method: SystemWindowButton>>highlight (in category 'visual properties') -----
+ highlight
+ 
+ 	self firstSubmorph form: self firstSubmorph form lighter.
+ !

Item was added:
+ ----- Method: SystemWindow class>>rebuildAllWindowLabels (in category 'preferences') -----
+ rebuildAllWindowLabels
+ 
+ 	self withAllSubclasses do: [:c | c allInstances do: [:w | w replaceBoxes]].!

Item was changed:
  ----- Method: SystemWindow>>expandToFullScreen (in category 'resize/collapse') -----
  expandToFullScreen
  	self unexpandedFrame ifNil: [ self unexpandedFrame: fullFrame ].
  	self fullScreen.
+ 	expandBox ifNotNil: [expandBox setBalloonText: 'contract to original size' translated]!
- 	expandBox setBalloonText: 'contract to original size' translated!

Item was changed:
  ----- Method: SystemWindow>>contractToOriginalSize (in category 'resize/collapse') -----
  contractToOriginalSize
  	self bounds: self unexpandedFrame.
  	self unexpandedFrame: nil.
+ 	expandBox ifNotNil: [expandBox setBalloonText: 'expand to full screen' translated].!
- 	^ expandBox setBalloonText: 'expand to full screen' translated!

Item was added:
+ ----- Method: SystemWindow class>>closeBoxFrame (in category 'preferences') -----
+ closeBoxFrame
+ 
+ 	^ CloseBoxFrame ifNil: [
+ 		CloseBoxFrame := (LayoutFrame new
+ 								leftFraction: 0;
+ 								leftOffset: 2;
+ 								topFraction: 0;
+ 								topOffset: 0;
+ 								yourself)]!

Item was added:
+ ----- Method: SystemWindow class>>boxExtent (in category 'preferences') -----
+ boxExtent
+ 	"answer the extent to use in all the buttons"
+ 	
+ 	^ (Preferences alternativeWindowBoxesLook
+ 		ifTrue: [18 @ 18]
+ 		ifFalse: [14 @ 14])!

Item was changed:
  Morph subclass: #LazyListMorph
  	instanceVariableNames: 'listItems font selectedRow selectedRows listSource maxWidth'
+ 	classVariableNames: 'ListSelectionColor ListSelectionTextColor'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Widgets'!
  
  !LazyListMorph commentStamp: 'efc 8/6/2005 11:34' prior: 0!
  The morph that displays the list in a PluggableListMorph.  It is "lazy" because it will only request the list items that it actually needs to display.
  
  I will cache the maximum width of my items in maxWidth to avoid this potentially expensive and frequent computation.!

Item was added:
+ ----- Method: SystemWindow class>>clickOnLabelToEdit: (in category 'preferences') -----
+ clickOnLabelToEdit: aBoolean
+ 
+ 	ClickOnLabelToEdit := aBoolean.
+ 	self rebuildAllWindowLabels.!

Item was changed:
  AlignmentMorph subclass: #PluggableButtonMorph
  	instanceVariableNames: 'model label getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown offColor onColor feedbackColor showSelectionFeedback allButtons arguments argumentsProvider argumentsSelector'
+ 	classVariableNames: 'RoundedButtonCorners'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Pluggable Widgets'!
  
  !PluggableButtonMorph commentStamp: '<historical>' prior: 0!
  A PluggableButtonMorph is a combination of an indicator for a boolean value stored in its model and an action button. The action of a button is often, but not always, to toggle the boolean value that it shows. Its pluggable selectors are:
  
  		getStateSelector		fetch a boolean value from the model
  		actionSelector		invoke this button's action on the model
  		getLabelSelector		fetch this button's lable from the model
  		getMenuSelector		fetch a pop-up menu for this button from the model
  
  Any of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. For example, if getStateSelector is nil, then this button shows the state of a read-only boolean that is always false.
  
  The model informs its view(s) of changes by sending #changed: to itself with getStateSelector as a parameter. The view tells the model when the button is pressed by sending actionSelector.
  
  If the actionSelector takes one or more arguments, then the following are relevant:
  		arguments			A list of arguments to provide when the actionSelector is called.
  		argumentsProvider	The object that is sent the argumentSelector to obtain arguments, if dynamic
  		argumentsSelector	The message sent to the argumentProvider to obtain the arguments.
  
  Options:
  	askBeforeChanging		have model ask user before allowing a change that could lose edits
  	triggerOnMouseDown	do this button's action on mouse down (vs. up) transition
  	shortcutCharacter		a place to record an optional shortcut key
  !

Item was added:
+ ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
+ createBox: aForm
+ 	"create a button with a form to be used in the label area"
+ 	
+ 	| box |
+ 	box := SystemWindowButton new.
+ 	box color: Color transparent;
+ 		 target: self;
+ 		 useSquareCorners;
+ 		 borderWidth: 0;
+ 		 labelGraphic: aForm;
+ 		 extent: self boxExtent.
+ 	^ box!

Item was added:
+ ----- Method: IconicButton>>doButtonAction (in category 'button') -----
+ doButtonAction
+ 
+ 	super doButtonAction.
+ 	self restoreImage.!

Item was changed:
  ----- Method: SystemWindow>>createMenuBox (in category 'initialization') -----
  createMenuBox
+ 	^ (self createBox: self class menuBoxImage)
+ 		actionSelector: #offerWindowMenu;
+ 		setBalloonText: 'window menu' translated!
- 	^ self createBox 
- 		
- 		labelGraphic: self class menuBoxImage;
- 
- 		 extent: self boxExtent;
- 		 actWhen: #buttonDown;
- 		 actionSelector: #offerWindowMenu;
- 		 setBalloonText: 'window menu' translated!

Item was added:
+ ----- Method: IconicButton>>darken (in category 'as yet unclassified') -----
+ darken
+ 
+ 	self firstSubmorph form: self firstSubmorph form darker.!

Item was removed:
- ----- Method: SystemWindow>>createBox (in category 'initialization') -----
- createBox
- 	"create a button with default to be used in the label area"
- 	"Transcript show: self paneColor asString;  
- 	cr."
- 	| box |
- 	box := IconicButton new.
- 	box color: Color transparent;
- 		 target: self;
- 		 useSquareCorners;
- 		 borderWidth: 0.
- 
- 	^ box!

Item was removed:
- ----- Method: ProportionalSplitterMorph>>drawOn: (in category 'displaying') -----
- drawOn: aCanvas 
- 	| dotBounds size alphaCanvas dotSize |
- 	super drawOn: aCanvas.
- 	self class showSplitterHandles ifTrue: [
- 	size := self splitsTopAndBottom
- 				ifTrue: [self handleSize transposed]
- 				ifFalse: [self handleSize].
- 	dotSize := self splitsTopAndBottom
- 				ifTrue: [6 @ self class splitterWidth]
- 				ifFalse: [self class splitterWidth @ 6].
- 	alphaCanvas := aCanvas asAlphaBlendingCanvas: 0.7.
- 	dotBounds := Rectangle center: self bounds center extent: size.
- 	alphaCanvas fillRectangle: dotBounds color: self handleColor.
- 	dotBounds := Rectangle center: self bounds center extent: dotSize.
- 	alphaCanvas fillRectangle: dotBounds color: self dotColor]!




More information about the Squeak-dev mailing list