[etoys-dev] Etoys Inbox: Sugar-kks.11.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 14 10:10:58 EDT 2010
K. K. Subramaniam uploaded a new version of Sugar to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Sugar-kks.11.mcz
==================== Summary ====================
Name: Sugar-kks.11
Author: kks
Time: 14 September 2010, 7:40:46 pm
UUID: 08c49e96-7e55-4bb6-b0f1-585f23e1e410
Ancestors: Sugar-kks.10
eliminate references to useArtificialSweetenerBar preference.
=============== Diff against Sugar-kks.10 ===============
Item was changed:
----- Method: SugarNavTab>>occupyTopRightCorner (in category 'positioning') -----
occupyTopRightCorner
"Make the receiver be the correct size, and occupy the top-right corner of the screen."
| worldBounds toUse |
worldBounds := ActiveWorld bounds.
- " toUse := Preferences useArtificialSweetenerBar
- ifFalse:
- [75]
- ifTrue:
- [(ActiveWorld extent >= (1200 @ 900))
- ifTrue:
- [75]
- ifFalse:
- [40]]."
toUse := 40. "Trying for the moment to use the smaller icon always when in this mode."
referent height: toUse; resizeButtonsAndTabTo: toUse.
self extent: toUse @ toUse.
self topRight: worldBounds topRight!
Item was changed:
----- Method: SugarNavTab>>showNavBar (in category 'initialization') -----
showNavBar
"Show the full nav-bar across the top of the screen."
self removeProperty: #collapsedMode.
+ referent delete.
-
referent rebuildButtons; hResizing: #spaceFill.
- Preferences useArtificialSweetenerBar ifTrue: [referent configureForSqueakland].
self hResizing: #spaceFill.
self edgeToAdhereTo: #top.
self position: 0 at 0.
self addMorph: referent!
Item was changed:
----- Method: SugarNavigatorBar>>checkForResize (in category 'morphic interaction') -----
checkForResize
"Check to see if the receiver needs to be reconfigured because of a world resize."
| shouldResize h worldBounds inset |
(owner isKindOf: SugarNavTab) ifFalse: [^ self]. "e.g. being held by hand."
owner edgeToAdhereTo = #topRight ifTrue: [^ owner occupyTopRightCorner].
shouldResize _ false.
worldBounds _ self world bounds.
(self layoutInset ~= (inset _ SugarLauncher isRunningInSugar ifTrue: [75 at 0] ifFalse: [0 at 0]))
ifTrue: [self layoutInset: inset].
worldBounds width ~= self width ifTrue: [shouldResize _ true].
- Preferences useArtificialSweetenerBar ifTrue: [
- h _ submorphs first submorphs first height.
- (worldBounds extent x >= 1200 and: [worldBounds extent y >= 900]) ifTrue: [
- h = 40 ifTrue: [self naviHeight: 75. shouldResize _ true]]
- ifFalse: [h = 75 ifTrue: [self naviHeight: 40. shouldResize _ true]]].
(h _ submorphs first submorphs first height) ~= self height ifTrue: [shouldResize _ true].
(owner notNil and: [owner isFlapTab]) ifTrue: [
owner edgeToAdhereTo == #top ifTrue: [
self topLeft ~= worldBounds topLeft ifTrue: [shouldResize _ true].
].
owner edgeToAdhereTo == #bottom ifTrue: [
self bottomLeft ~= worldBounds bottomLeft ifTrue: [shouldResize _ true].
].
shouldResize ifTrue: [
owner edgeToAdhereTo == #top ifTrue: [
self bounds: (0 at 0 corner: (worldBounds width at h)).
].
owner edgeToAdhereTo == #bottom ifTrue: [
self bounds: (0@(worldBounds height - h) corner: (worldBounds bottomRight)).
].
self resizeProjectNameField.
owner layoutChanged.
].
].!
Item was changed:
----- Method: SugarNavigatorBar>>rebuildButtons (in category 'initialization') -----
rebuildButtons
+ submorphs do: [:e | e delete].
+ self addButtons!
- (owner isNil or: [owner hasProperty: #collapsedMode])
- ifFalse: [
- self delete.
- submorphs do: [:e | e delete].
- self addButtons]!
Item was changed:
----- Method: SugarNavigatorBar>>showOnlyShowNavBarButton (in category 'morphic interaction') -----
showOnlyShowNavBarButton
"Reconfigure the receiver such that it only shows the show-nav-bar button"
self removeAllMorphs.
self addMorph: (self inARow: {self buttonShowNavBar}).
+ self hResizing: #shrinkWrap.!
- self hResizing: #shrinkWrap.
- Preferences useArtificialSweetenerBar ifTrue: [self configureForSqueakland].!
More information about the etoys-dev
mailing list