The Trunk: Morphic-mt.801.mcz

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

The Trunk: Morphic-mt.801.mcz

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

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

Name: Morphic-mt.801
Author: mt
Time: 1 April 2015, 1:36:02.765 pm
UUID: 755e5f34-e9d2-a84e-a23e-c33ad43e082e
Ancestors: Morphic-mt.800

Scrollbars: Fixed button initialization code for rounded scrollbars.

=============== Diff against Morphic-mt.800 ===============

Item was changed:
  ----- Method: ScrollBar>>initializeMenuButton (in category 'initialize') -----
  initializeMenuButton
  "initialize the receiver's menuButton"
  "Preferences disable: #scrollBarsWithoutMenuButton"
  "Preferences enable: #scrollBarsWithoutMenuButton"
  (Preferences valueOfFlag: #scrollBarsWithoutMenuButton)
  ifTrue: [menuButton := nil .^ self].
  self bounds isWide
  ifTrue: [menuButton := nil .^ self].
+ menuButton := RectangleMorph
- menuButton := self class roundedScrollBarLook
- ifTrue: [RectangleMorph
- newBounds: ((bounds isWide
- ifTrue: [upButton bounds topRight]
- ifFalse: [upButton bounds bottomLeft])
- extent: self buttonExtent)]
- ifFalse: [RectangleMorph
  newBounds: (self innerBounds topLeft extent: self buttonExtent)
+ color: self thumbColor.
- color: self thumbColor].
  menuButton
  on: #mouseEnter
  send: #menuButtonMouseEnter:
  to: self.
  menuButton
  on: #mouseDown
  send: #menuButtonMouseDown:
  to: self.
  menuButton
  on: #mouseLeave
  send: #menuButtonMouseLeave:
  to: self.
  "menuButton
  addMorphCentered: (RectangleMorph
  newBounds: (0 @ 0 extent: 4 @ 2)
  color: Color black)."
  self updateMenuButtonImage.
  self class roundedScrollBarLook
  ifTrue: [menuButton color: Color veryLightGray.
  menuButton
  borderStyle: (BorderStyle complexRaised width: 3)]
  ifFalse: [menuButton setBorderWidth: 1 borderColor: Color lightGray].
  self addMorph: menuButton!

Item was changed:
  ----- Method: ScrollBar>>initializeSlider (in category 'initialize') -----
  initializeSlider
+
+ self
+ initializeMenuButton;
+ initializeUpButton;
+ initializeDownButton;
+ initializePagingArea.
+
- "initialize the receiver's slider"
- self class roundedScrollBarLook
- ifTrue: [self initializeUpButton; initializeMenuButton; initializeDownButton; initializePagingArea]
- ifFalse: [self initializeMenuButton; initializeUpButton; initializeDownButton; initializePagingArea].
  super initializeSlider.
  self class roundedScrollBarLook
  ifTrue: [slider cornerStyle: #rounded.
  slider
  borderStyle: (BorderStyle complexRaised width: 3).
  sliderShadow cornerStyle: #rounded].
  self sliderColor: self sliderColor!

Item was changed:
  ----- Method: ScrollBar>>initializeUpButton (in category 'initialize') -----
  initializeUpButton
  "initialize the receiver's upButton"
+ upButton := RectangleMorph
+ newBounds: ((menuButton
+ ifNil: [self innerBounds topLeft]
+ ifNotNil: [bounds isWide
+ ifTrue: [menuButton bounds topRight - (1@0)]
+ ifFalse: [menuButton bounds bottomLeft - (0@1)]])
+ extent: self buttonExtent).
- upButton := self class roundedScrollBarLook
- ifTrue: [RectangleMorph
- newBounds: (self innerBounds topLeft extent: self buttonExtent)]
- ifFalse: [RectangleMorph
- newBounds: ((menuButton
- ifNil: [self innerBounds topLeft]
- ifNotNil: [bounds isWide
- ifTrue: [menuButton bounds topRight - (1@0)]
- ifFalse: [menuButton bounds bottomLeft - (0@1)]])
- extent: self buttonExtent)].
  upButton color: self thumbColor.
  upButton
  on: #mouseDown
  send: #scrollUpInit
  to: self.
  upButton
  on: #mouseUp
  send: #finishedScrolling
  to: self.
  self updateUpButtonImage.
  self class roundedScrollBarLook
  ifTrue: [upButton color: Color veryLightGray.
  upButton
  borderStyle: (BorderStyle complexRaised width: 3)]
  ifFalse: [upButton setBorderWidth: 1 borderColor: Color lightGray].
 
  self class scrollBarsWithoutArrowButtons
  ifFalse: [self addMorph: upButton].!