The Trunk: ToolBuilder-Morphic-mt.169.mcz

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

The Trunk: ToolBuilder-Morphic-mt.169.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.169.mcz

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

Name: ToolBuilder-Morphic-mt.169
Author: mt
Time: 21 July 2016, 11:52:17.079126 am
UUID: 19a0f1e3-5b24-a945-ad3d-715c8ad73f3b
Ancestors: ToolBuilder-Morphic-topa.168

Fixes a bug in tool builder. Pluggable buttons that have color-callbacks now correctly update the color when created.

=============== Diff against ToolBuilder-Morphic-topa.168 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableButton: (in category 'widgets required') -----
  buildPluggableButton: aSpec
  | widget label state action enabled |
  label := aSpec label.
  state := aSpec state.
  action := aSpec action.
  widget := self buttonClass on: aSpec model
  getState: (state isSymbol ifTrue:[state])
  action: nil
  label: (label isSymbol ifTrue:[label]).
  widget style: aSpec style.
  aSpec changeLabelWhen
  ifNotNilDo: [ :event | widget whenChanged: event update: aSpec label].
  self register: widget id: aSpec name.
  enabled := aSpec enabled.
  enabled isSymbol
  ifTrue:[widget getEnabledSelector: enabled]
  ifFalse:[widget enabled:enabled].
  widget action: action.
  aSpec color isColor
  ifTrue: [widget
  onColor: aSpec color
  offColor: aSpec color]
  ifFalse: [
  widget getColorSelector: aSpec color.
+ widget update: aSpec color].
- widget offColor: Color white].
  self buildHelpFor: widget spec: aSpec.
  (label isSymbol or:[label == nil]) ifFalse:[widget label: label].
  self setFrame: aSpec frame in: widget.
  self setLayoutHintsFor: widget spec: aSpec.
  parent ifNotNil:[self add: widget to: parent].
  ^widget!