[squeak-dev] The Trunk: MorphicExtras-ct.333.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 13 09:48:01 UTC 2022
Christoph Thiede uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ct.333.mcz
==================== Summary ====================
Name: MorphicExtras-ct.333
Author: ct
Time: 13 September 2022, 11:47:58.797695 am
UUID: 94a7eed3-7356-bd46-a34d-8feb18b6576d
Ancestors: MorphicExtras-ct.332
Fixes a high-dpi slip in PianoRollScoreMorph.
=============== Diff against MorphicExtras-ct.332 ===============
Item was changed:
----- Method: PianoRollScoreMorph>>moveCursorToTime: (in category 'scrolling') -----
moveCursorToTime: scoreTime
| cursorOffset desiredCursorHeight |
scorePlayer isPlaying
ifTrue:
[cursorOffset := ((scoreTime - leftEdgeTime) asFloat * timeScale * RealEstateAgent scaleFactor) asInteger.
(cursorOffset < 0
or: [cursorOffset > (self width - 20 px)])
ifTrue:
[self goToTime: scoreTime - (20 px / timeScale).
+ cursorOffset := ((scoreTime - leftEdgeTime) asFloat * timeScale * RealEstateAgent scaleFactor) asInteger]]
- cursorOffset := ((scoreTime - leftEdgeTime) asFloat * timeScale) asInteger]]
ifFalse:
+ [self goToTime: (scoreTime - (self width//2 / timeScale / RealEstateAgent scaleFactor)
+ max: (self width//10 / timeScale / RealEstateAgent scaleFactor) negated).
+ cursorOffset := ((scoreTime - leftEdgeTime) asFloat * timeScale * RealEstateAgent scaleFactor) asInteger].
- [self goToTime: (scoreTime - (self width//2 / timeScale)
- max: (self width//10 / timeScale) negated).
- cursorOffset := ((scoreTime - leftEdgeTime) asFloat * timeScale) asInteger].
cursor position: (self left + self borderWidth + cursorOffset)@(self top + self borderWidth).
desiredCursorHeight := self height.
cursor height ~= desiredCursorHeight ifTrue: [cursor extent: (1 px clampLow: 1) @ desiredCursorHeight].!
More information about the Squeak-dev
mailing list
|