[squeak-dev] The Inbox: ToolBuilder-Morphic-kfr.156.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 10 17:40:42 UTC 2016


A new version of ToolBuilder-Morphic was added to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Morphic-kfr.156.mcz

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

Name: ToolBuilder-Morphic-kfr.156
Author: kfr
Time: 6 January 2016, 6:40:29.066914 pm
UUID: b27a281b-507f-4b2d-b00f-de1857c6e9b2
Ancestors: ToolBuilder-Morphic-kfr.155

Use SystemWindow backgroundColor instead of Color white

=============== Diff against ToolBuilder-Morphic-kfr.155 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableList: (in category 'widgets required') -----
  buildPluggableList: aSpec
  	| widget listClass getIndex setIndex |
  	aSpec getSelected ifNil:[
  		listClass := self listClass.
  		getIndex := aSpec getIndex.
  		setIndex := aSpec setIndex.
  	] ifNotNil:[
  		listClass := self listByItemClass.
  		getIndex := aSpec getSelected.
  		setIndex := aSpec setSelected.
  	].
  	widget := listClass on: aSpec model
  				list: aSpec list
  				selected: getIndex
  				changeSelected: setIndex
  				menu: aSpec menu
  				keystroke: aSpec keyPress.
  	self register: widget id: aSpec name.
  	
  	"Override default scroll bar policies if needed. Widget will use preference values otherwise."
  	aSpec hScrollBarPolicy ifNotNil: [:policy |
  		policy caseOf: {
  			[#always] -> [widget alwaysShowHScrollBar].
  			[#never] -> [widget hideHScrollBarIndefinitely].
  			[#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]. } ].
  	aSpec vScrollBarPolicy ifNotNil: [:policy |
  		policy caseOf: {
  			[#always] -> [widget alwaysShowVScrollBar].
  			[#never] -> [widget hideVScrollBarIndefinitely].
  			[#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]. } ].	
  	
  	widget getListElementSelector: aSpec listItem.
  	widget getListSizeSelector: aSpec listSize.
  	widget getIconSelector: aSpec icon.
  	widget getHelpSelector: aSpec help.
  	widget doubleClickSelector: aSpec doubleClick.
  	
  	widget dragItemSelector: aSpec dragItem.
  	widget dropItemSelector: aSpec dropItem.
  	widget wantsDropSelector: aSpec dropAccept.
  	widget dragStartedSelector: aSpec dragStarted.
  	
  	widget autoDeselect: aSpec autoDeselect.
  	widget keystrokePreviewSelector: aSpec keystrokePreview.
  	
  	widget 
  		borderWidth: 1; 
+ 		borderColor: Color lightGray.
+ 		
+ 	widget color: SystemWindow backgroundColor.
- 		borderColor: Color lightGray;
- 		color: (aSpec color 
- 			ifNil: [Color white]
- 			ifNotNil: [aSpec color]).
- 			
  	self setFrame: aSpec frame in: widget.
  	self setLayoutHintsFor: widget spec: aSpec.
  	
  	parent ifNotNil:[self add: widget to: parent].
  	panes ifNotNil:[
  		aSpec list ifNotNil:[panes add: aSpec list].
  	].
  	^widget!

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableText: (in category 'widgets required') -----
  buildPluggableText: aSpec
  	| widget |
  	widget := self textPaneClass new.
  	aSpec stylerClass ifNotNil: [:c | widget styler: (c new view: widget)].	
  	widget
  		on: aSpec model
  		text: aSpec getText 
  		accept: aSpec setText
  		readSelection: aSpec selection 
  		menu: aSpec menu.
  	aSpec font ifNotNil: [:f | widget font: f].
  	
  	widget readOnly: aSpec readOnly.
  	widget editTextSelector: aSpec editText.
  	widget wantsFrameAdornments: aSpec indicateUnacceptedChanges.
  	widget askBeforeDiscardingEdits: aSpec askBeforeDiscardingEdits.
  
  	aSpec softLineWrap ifNotNil: [:b | widget wrapFlag: b].
  
  	widget isAutoFit
  		ifTrue: [widget hideHScrollBarIndefinitely]
  		ifFalse: [widget showHScrollBarOnlyWhenNeeded].
  	
  	self register: widget id: aSpec name.
  	widget getColorSelector: aSpec color.
  	self buildHelpFor: widget spec: aSpec.
  	 
  	self setFrame: aSpec frame in: widget.
  	self setLayoutHintsFor: widget spec: aSpec.
  	
  	parent ifNotNil:[self add: widget to: parent].
  	widget borderColor: Color lightGray.
+ 	widget color: SystemWindow backgroundColor.
- 	widget color: Color white.
  	^widget!



More information about the Squeak-dev mailing list