The Trunk: System-ar.308.mcz

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

The Trunk: System-ar.308.mcz

commits-2
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.308.mcz

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

Name: System-ar.308
Author: ar
Time: 2 April 2010, 10:45:40.986 pm
UUID: 4bebe387-cc68-0c4e-ad67-cd3dbc4dd692
Ancestors: System-ar.307, System-cbr.306

Merging System-cbr.306:

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-ar.307 ===============

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@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@400".
+ (extent y < 300) ifTrue: [^ (extent x)@300 ].
+ ^ extent].
- ^ (allowedArea extent - (grid*(maxLevel+1*2) + (grid//2))) min: StandardSize "600@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"!