[squeak-dev] The Trunk: Morphic-mt.764.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Feb 27 10:34:31 UTC 2015
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.764.mcz
==================== Summary ====================
Name: Morphic-mt.764
Author: mt
Time: 27 February 2015, 11:33:22.268 am
UUID: 2ca4e315-b777-2847-830e-366884514d22
Ancestors: Morphic-ul.763
New pragma-preference for #gradientMenu to update SystemProgressbar instance accordingly. Postload-script will remove the old-style preference.
=============== Diff against Morphic-ul.763 ===============
Item was changed:
----- Method: DockingBarMorph>>initialize (in category 'initialize-release') -----
initialize
"initialize the receiver"
super initialize.
selectedItem := nil.
activeSubMenu := nil.
fillsOwner := true.
avoidVisibleBordersAtEdge := true.
+ autoGradient := MenuMorph gradientMenu.
- autoGradient := Preferences gradientMenu.
self
setDefaultParameters ;
beFloating ;
beSticky ;
layoutInset: 0 ;
dropEnabled: true.
Project current world activeHand addKeyboardListener: self!
Item was changed:
----- Method: FillInTheBlankMorph>>updateColor:color:intensity: (in category 'initialization') -----
updateColor: aMorph color: aColor intensity: anInteger
"update the apareance of aMorph"
| fill |
+ MenuMorph gradientMenu
- Preferences gradientMenu
ifFalse: [^ self].
fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> aColor}.
fill radial: false;
origin: aMorph topLeft;
direction: 0 @ aMorph height.
aMorph fillStyle: fill!
Item was changed:
----- Method: MenuItemMorph>>selectionFillStyle (in category 'private') -----
selectionFillStyle
" Answer the fill style to use with the receiver is the selected
element "
| fill baseColor preferenced |
Display depth <= 2 ifTrue: [
^Color gray ].
preferenced := Preferences menuSelectionColor.
preferenced notNil ifTrue: [ ^preferenced ].
baseColor := owner color negated.
+ MenuMorph gradientMenu ifFalse: [ ^baseColor ].
- Preferences gradientMenu ifFalse: [ ^baseColor ].
fill := GradientFillStyle ramp: {
0.0 -> baseColor twiceLighter.
1 -> baseColor twiceDarker }.
fill origin: self topLeft.
^ fill!
Item was changed:
AlignmentMorph subclass: #MenuMorph
instanceVariableNames: 'defaultTarget selectedItem stayUp popUpOwner activeSubMenu'
+ classVariableNames: 'CloseBoxImage GradientMenu PushPinImage'
- classVariableNames: 'CloseBoxImage PushPinImage'
poolDictionaries: ''
category: 'Morphic-Menus'!
!MenuMorph commentStamp: '<historical>' prior: 0!
Instance variables:
defaultTarget <Object> The default target for creating menu items
selectedItem <MenuItemMorph> The currently selected item in the receiver
stayUp <Boolean> True if the receiver should stay up after clicks
popUpOwner <MenuItemMorph> The menu item that automatically invoked the receiver, if any.
activeSubMenu <MenuMorph> The currently active submenu.!
Item was added:
+ ----- Method: MenuMorph class>>gradientMenu (in category 'preferences') -----
+ gradientMenu
+
+ <preference: 'gradientMenu'
+ category: #menus
+ description: 'If true, the menus will have a gradient look.'
+ type: #Boolean>
+ ^ GradientMenu ifNil: [true]!
Item was added:
+ ----- Method: MenuMorph class>>gradientMenu: (in category 'preferences') -----
+ gradientMenu: aBoolean
+
+ GradientMenu := aBoolean.
+ SystemProgressMorph reset.!
Item was changed:
----- Method: MenuMorph>>updateColor (in category 'control') -----
updateColor
| fill title |
+ self class gradientMenu
- Preferences gradientMenu
ifFalse: [^ self].
(self fillStyle == self color) not
ifTrue: [^ self]. "Don't apply the gradient more than once"
""
fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> self color}.
""
fill
radial: false;
origin: self topLeft;
direction: 0 @ self height.
""
self fillStyle: fill.
"
update the title color"
title := self allMorphs
detect: [:each | each hasProperty: #titleString]
ifNone: [^ self].
""
fill := GradientFillStyle ramp: {0.0 -> title color twiceLighter. 1 -> title color twiceDarker}.
""
fill
origin: title topLeft;
direction: title width @ 0.
""
title fillStyle: fill!
Item was changed:
----- Method: SystemProgressMorph>>updateColor:color:intensity: (in category 'initialization') -----
updateColor: aMorph color: aColor intensity: anInteger
"update the apareance of aMorph"
| fill |
+ MenuMorph gradientMenu
- Preferences gradientMenu
ifFalse: [^ self].
fill := GradientFillStyle ramp: {0.0 -> Color white. 1 ->aColor}.
fill radial: false;
origin: aMorph topLeft;
direction: 0 @ aMorph height.
aMorph fillStyle: fill!
Item was changed:
(PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false.
"Force SystemProgressMorph to be reset"
SystemProgressMorph initialize; reset.
"Initialize the key bindings and menus"
Editor initialize.
"Retain scrollBar look now that the pref actually does something"
Preferences enable: #gradientScrollBars.
"apply the new icons"
MenuIcons initializeIcons.
TheWorldMainDockingBar updateInstances.
+
+ "Cleanup old-style preferences here. Remove before new release."
+ Preferences removePreference: #gradientMenu. "Now in MenuMorph."'!
- '!
More information about the Squeak-dev
mailing list
|