Etoys Inbox: Sugar-kfr.21.mcz

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

Etoys Inbox: Sugar-kfr.21.mcz

commits-2
A new version of Sugar was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Sugar-kfr.21.mcz

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

Name: Sugar-kfr.21
Author: kfr
Time: 24 February 2012, 8:08:17 am
UUID: 25a6a4a6-d52a-9d48-9b14-a3ea7aa52f15
Ancestors: Sugar-kfr.20

Adjust position of scrollbar. Delete slider shadow on mouseUp.

=============== Diff against Sugar-kfr.20 ===============

Item was changed:
  ----- Method: SugarNavigatorBar>>soundVolume (in category 'buttons creation') -----
  soundVolume
+ |   slider r p sliderShadow |
+ soundSlider ifNotNil:[soundSlider delete].
+ soundSlider := SimpleSliderMorph new.
+ soundSlider position: soundButton position+ (6@30).
+ soundSlider borderColor: Color black; borderWidth: 2.
+ soundSlider width:25.
+ soundSlider adjustToValue: SoundPlayer soundVolume average.
+ soundSlider descending: true.
+ soundSlider beSticky.
+ slider := soundSlider submorphs first.
+ sliderShadow := soundSlider submorphs second.
- |  bar slider r p |
- bar := SimpleSliderMorph new.
- bar position: soundButton position+ (6@15).
- bar borderColor: Color black; borderWidth: 2.
- bar width:25.
- bar adjustToValue: SoundPlayer soundVolume average.
- bar descending: true.
- bar beSticky.
- slider := bar submorphs first.
  slider  borderWidth: 0; color: Color black .
+ soundSlider  on: #mouseLeave send: #value to: [ soundSlider delete].
+ soundSlider  on: #mouseUp send: #value to: [
+ r := soundSlider roomToMove.
- bar  on: #mouseLeave send: #value to: [ bar delete].
- bar  on: #mouseUp send: #value to: [
- r := bar roomToMove.
  p :=  ActiveHand lastEvent position adhereTo: r.
+ soundSlider setValue: ((r bottom - p y ) asFloat / r height ).
+ self setSoundVolume: soundSlider value.
+ sliderShadow hide.
- bar setValue: ((r bottom - p y ) asFloat / r height ).
- self setSoundVolume: bar value.
  self beep:'coyote'].
  slider  on: #mouseUp send: #value to: [
+ self setSoundVolume: soundSlider value.
+ sliderShadow hide.
- self setSoundVolume: bar value.
  self beep:'coyote'].
  slider  on: #mouseMove send: #value to: [
+ soundSlider scrollAbsolute: ActiveHand lastEvent.
+ self setSoundVolume: soundSlider value].
+ ^soundSlider openInWorld!
- bar scrollAbsolute: ActiveHand lastEvent.
- self setSoundVolume: bar value].
- ^bar openInWorld!

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev