[squeak-dev] The Inbox: System-cbr.306.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 31 00:36:36 UTC 2010


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-cbr.306.mcz

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

Name: System-cbr.306
Author: cbr
Time: 30 March 2010, 5:35:55.497 pm
UUID: ea39687e-5cab-4f72-88e2-2177d7fc187c
Ancestors: System-nice.305

Fixed weirdness in RealEstateAgent>>standardWindowExtent which was causing browsers/etc to appear too small to use on devices with small screens. I did the most unobtrusive thing possible, as 4.1 is in code lockdown. In order to figure out what was going wrong, I refactored the whole thing, but I will save those changes for 4.2, opting to do what it takes to make the system browser usable on your 2010 interrim Dynabook. It should be noted that this method was guilty of shenanigans before I touched it :-)

=============== Diff against System-nice.305 ===============

Item was changed:
  ----- Method: RealEstateAgent class>>standardWindowExtent (in category 'settings') -----
  standardWindowExtent
  	"Answer the standard default extent for new windows.  "
  
+ 	| effectiveExtent width strips height grid allowedArea maxLevel extent |
- 	| effectiveExtent width strips height grid allowedArea maxLevel |
  	effectiveExtent := self maximumUsableArea extent
  					- (self scrollBarSetback @ self screenTopSetback).
  	Preferences reverseWindowStagger ifTrue:
  		["NOTE: following copied from strictlyStaggeredInitialFrameFor:"
  		allowedArea := self maximumUsableArea insetBy: (
  			self scrollBarSetback @ self screenTopSetback extent: 0 at 0
  		).
  		"Number to be staggered at each corner (less on small screens)"
  		maxLevel := allowedArea area > 300000 ifTrue: [3] ifFalse: [2].
  		"Amount by which to stagger (less on small screens)"
  		grid := allowedArea area > 500000 ifTrue: [40] ifFalse: [20].
+ 		extent := (allowedArea extent - (grid*(maxLevel+1*2) + (grid//2))) min: StandardSize "600 at 400".
+ 		(extent y < 300) ifTrue: [^ (extent x)@300 ].
+ 		^ extent].
- 		^ (allowedArea extent - (grid*(maxLevel+1*2) + (grid//2))) min: StandardSize "600 at 400"].
  	width := (strips := self windowColumnsDesired) > 1
  		ifTrue:
  			[effectiveExtent x // strips]
  		ifFalse:
  			[(3 * effectiveExtent x) // 4].
  	height := (strips := self windowRowsDesired) > 1
  		ifTrue:
  			[effectiveExtent y // strips]
  		ifFalse:
  			[(3 * effectiveExtent y) //4].
  	^ width @ height
  
  "RealEstateAgent standardWindowExtent"!




More information about the Squeak-dev mailing list