The Trunk: 51Deprecated-mt.38.mcz

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

The Trunk: 51Deprecated-mt.38.mcz

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

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

Name: 51Deprecated-mt.38
Author: mt
Time: 31 July 2016, 11:24:23.37849 am
UUID: 165d2c29-2c81-c841-a85c-a60b5a222130
Ancestors: 51Deprecated-mt.37

*** Widget Refactorings and UI Themes (Part 6 of 11) ***

Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming.

=============== Diff against 51Deprecated-mt.37 ===============

Item was added:
+ ----- Method: NewParagraph>>insertionPointColor (in category '*51Deprecated') -----
+ insertionPointColor
+ self focused ifFalse: [^ Color transparent].
+ ^ Display depth <= 2
+ ifTrue: [Color black]
+ ifFalse: [Preferences insertionPointColor]!

Item was added:
+ ----- Method: ScrollBar class>>createArrowOfDirection:in: (in category '*51Deprecated') -----
+ createArrowOfDirection: aSymbol in: aRectangle
+ "PRIVATE - create an arrow bounded in aRectangle"
+
+ | arrow vertices |
+ vertices := Preferences alternativeButtonsInScrollBars
+ ifTrue: [self verticesForComplexArrow: aRectangle]
+ ifFalse: [self verticesForSimpleArrow: aRectangle].
+ ""
+ arrow := PolygonMorph
+ vertices: vertices
+ color: Color transparent
+ borderWidth: 0
+ borderColor: Color black.
+ ""
+ arrow bounds: (arrow bounds insetBy: (aRectangle width / 6) rounded).
+ ""
+ Preferences alternativeButtonsInScrollBars
+ ifTrue: [arrow rotationDegrees: 45].
+ ""
+ aSymbol == #right
+ ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 90].
+ aSymbol == #bottom
+ ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 180].
+ aSymbol == #left
+ ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 270].
+ ""
+ ^arrow!

Item was added:
+ ----- Method: ScrollBar class>>createBoxIn: (in category '*51Deprecated') -----
+ createBoxIn: aRectangle
+ "PRIVATE - create an box bounded in aRectangle"
+ | box |
+ box := RectangleMorph new.
+ box extent: (aRectangle scaleBy: 1 / 2) extent rounded;
+ borderWidth: 0.
+ ""
+ ^ box!

Item was added:
+ ----- Method: ScrollBar class>>updateScrollBarButtonAspect:color: (in category '*51Deprecated') -----
+ updateScrollBarButtonAspect: aMorph color: aColor
+ "update aMorph with aColor"
+ | fill direction |
+ aMorph isNil
+ ifTrue: [^ self].
+ ""
+ aMorph color: aColor.
+ self gradientScrollBar ifFalse: [^ self].
+ ""
+ fill := GradientFillStyle ramp: {
+ 0.0 -> aColor twiceLighter twiceLighter.
+ 1.0 -> aColor twiceDarker}.
+ ""
+ direction := ((aMorph width min: aMorph height)
+ + ((aMorph width - aMorph height) abs * 0.3)) rounded.
+ ""
+ fill origin: aMorph topLeft + (direction // 8).
+ fill direction: direction @ direction.
+ fill radial: true.
+ ""
+ aMorph fillStyle: fill!

Item was added:
+ ----- Method: ScrollBar class>>updateScrollBarButtonsAspect:color: (in category '*51Deprecated') -----
+ updateScrollBarButtonsAspect: aCollection color: aColor
+ "update aCollection of morphs with aColor"
+
+
+ aCollection
+ do: [:each | self updateScrollBarButtonAspect: each color: aColor]!

Item was added:
+ ----- Method: ScrollBar class>>verticesForComplexArrow: (in category '*51Deprecated') -----
+ verticesForComplexArrow: aRectangle
+ "PRIVATE - answer a collection of vertices to draw a complex arrow"
+ | vertices aux |
+ vertices := OrderedCollection new.
+ ""
+ vertices add: aRectangle bottomLeft.
+ vertices add: aRectangle topLeft.
+ vertices add: aRectangle topRight.
+ ""
+ aux := (aRectangle width / 3) rounded.
+ vertices add: aRectangle topRight + (0 @ aux).
+ vertices add: aRectangle topLeft + aux.
+ vertices add: aRectangle bottomLeft + (aux @ 0).
+ ""
+ ^ vertices!

Item was added:
+ ----- Method: ScrollBar class>>verticesForSimpleArrow: (in category '*51Deprecated') -----
+ verticesForSimpleArrow: aRectangle
+ "PRIVATE - answer a collection of vertices to draw a simple arrow"
+ | vertices |
+ vertices := OrderedCollection new.
+ ""
+ vertices add: aRectangle bottomLeft.
+ vertices add: aRectangle center x @ (aRectangle top + (aRectangle width / 8)).
+ vertices add: aRectangle bottomRight.
+ ""
+ ^ vertices!

Item was added:
+ ----- Method: ScrollBar>>scrollDown (in category '*51Deprecated') -----
+ scrollDown
+ self flag: #obsolete.
+ downButton eventHandler: nil.
+ downButton on: #mouseDown send: #scrollDownInit to: self.
+ downButton on: #mouseUp send: #finishedScrolling to: self.
+ ^self scrollDownInit!

Item was added:
+ ----- Method: ScrollBar>>scrollUp (in category '*51Deprecated') -----
+ scrollUp
+ self flag: #obsolete.
+ upButton eventHandler: nil.
+ upButton on: #mouseDown send: #scrollUpInit to: self.
+ upButton on: #mouseUp send: #finishedScrolling to: self.
+ ^self scrollUpInit!