[squeak-dev] The Inbox: ToolBuilder-Morphic-ct.254.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Feb 10 10:25:54 UTC 2020
[cid:42eea2cd-ff16-4f0b-a042-cb3e580f99ba]
Note this is still a quite simple implementation. Further improvements could include:
- #editValue(:) that is called while the slider is moved, but before it is dropped
- Click left/above the slider to reduce its value, or right/below the slider to increase it.
- #orientation(:) to override default orientation behavior (i. e., "longer dimension wins")?
- This is how a slider in widgets looks:
[cid:1286b517-85cc-4106-8d59-95ebab8f4305]
Pretty cool appearance, this would be a nice-to-have for Morphic as well.
I wonder whether we would want to subclass Slider again (PluggableSliderMorph) or rather change the base class implementation?
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Montag, 10. Februar 2020 11:15 Uhr
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: ToolBuilder-Morphic-ct.254.mcz
Christoph Thiede uploaded a new version of ToolBuilder-Morphic to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Morphic-ct.254.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.254
Author: ct
Time: 10 February 2020, 11:15:15.198089 am
UUID: e95e688c-632c-7b40-b6ca-4e481bbe57fd
Ancestors: ToolBuilder-Morphic-mt.251
Adds support for PluggableSliderSpec. Complements ToolBuilder-Kernel-ct.139.
=============== Diff against ToolBuilder-Morphic-mt.251 ===============
Item was added:
+ ----- Method: MorphicToolBuilder>>buildPluggableSlider: (in category 'widgets optional') -----
+ buildPluggableSlider: spec
+
+ | widget |
+ widget := self sliderClass
+ on: spec model
+ getValue: spec getValue
+ setValue: spec setValue
+ min: spec minValue
+ max: spec maxValue
+ quantum: spec quantum.
+ self register: widget id: spec name.
+
+ spec color ifNotNil: [:color | widget color: color].
+ spec thumbColor ifNotNil: [:color | widget sliderColor: color].
+ self setFrame: spec frame in: widget.
+ self setLayoutHintsFor: widget spec: spec.
+ parent ifNotNil: [self add: widget to: parent].
+ ^ widget!
Item was added:
+ ----- Method: MorphicToolBuilder>>sliderClass (in category 'widget classes') -----
+ sliderClass
+
+ ^ Slider!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200210/e352f91f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 40786 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200210/e352f91f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 439 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200210/e352f91f/attachment-0001.png>
More information about the Squeak-dev
mailing list
|