[squeak-dev] The Inbox: Tools-jmg.520.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 3 06:04:28 UTC 2014


A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-jmg.520.mcz

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

Name: Tools-jmg.520
Author: jmg
Time: 2 March 2014, 11:03:51.546 pm
UUID: da618b0c-bf0b-e64f-b8e7-6504d1e63fe4
Ancestors: Tools-cmm.519

Begin refactoring and clean up of the Archive viewer but having it use the system default font, and having it create itself without using hardcoded heights for components.  More to come.

=============== Diff against Tools-cmm.519 ===============

Item was changed:
  ----- Method: ArchiveViewer>>createWindow (in category 'initialization') -----
  createWindow
+ 	| list heading font text buttonBar currentHeightOffset stringHeight |
+ 	font := TextStyle default defaultFont.
- 	| list heading font text buttonBar |
- 
- 	font := (TextStyle named: #DefaultFixedTextStyle)
- 		ifNotNil: [ :ts | ts fontArray first].
- 
  	buttonBar := self createButtonBar.
+ 	currentHeightOffset := buttonBar fullBounds height + self paddingAmount.
+ 	self
+ 		addMorph: buttonBar
+ 		fullFrame: (LayoutFrame
+ 				fractions: (0 @ 0 corner: 1.0 @ 0.0)
+ 				offsets: (0 @ 0 corner: 0 @ currentHeightOffset)).
+ 	self minimumExtent: buttonBar fullBounds width + 20 @ 230.
- 	self addMorph: buttonBar
- 		fullFrame: (LayoutFrame fractions: (0 at 0 corner: 1.0 at 0.0) offsets: (0 at 0 corner: 0 at 44)).
- 
- 	self minimumExtent: (buttonBar fullBounds width + 20) @ 230.
  	self extent: self minimumExtent.
- 
  	heading := self createListHeadingUsingFont: font.
+ 	stringHeight := heading fullBounds height.
+ 	self
+ 		addMorph: heading
+ 		fullFrame: (LayoutFrame
+ 				fractions: (0 @ 0 corner: 1.0 @ 0.0)
+ 				offsets: (0 @ currentHeightOffset corner: 0 @ (currentHeightOffset + stringHeight + self paddingAmount))).
+ 	currentHeightOffset := currentHeightOffset + stringHeight + self paddingAmount.
- 	self addMorph: heading
- 		fullFrame: (LayoutFrame fractions: (0 at 0 corner: 1.0 at 0.0) offsets: (0 at 44 corner: 0 at 60)).
- 
  	(list := PluggableListMorph new)
+ 		on: self
+ 		list: #memberList
+ 		selected: #memberIndex
+ 		changeSelected: #memberIndex:
+ 		menu: #memberMenu:shifted:
+ 		keystroke: nil.
- 		on: self list: #memberList
- 		selected: #memberIndex changeSelected: #memberIndex:
- 		menu: #memberMenu:shifted: keystroke: nil.
  	list color: self defaultBackgroundColor.
+ 	font
+ 		ifNotNil: [list font: font].
+ 	self
+ 		addMorph: list
+ 		fullFrame: (LayoutFrame
+ 				fractions: (0 @ 0 corner: 1.0 @ 0.8)
+ 				offsets: (0 @ currentHeightOffset corner: 0 @ 0)).
+ 	text := PluggableTextMorph
+ 				on: self
+ 				text: #contents
+ 				accept: nil
+ 				readSelection: nil
+ 				menu: nil.
+ 	self
+ 		addMorph: text
+ 		frame: (0 @ 0.8 corner: 1.0 @ 1.0).
- 
- 	font ifNotNil: [list font: font].
- 	self addMorph: list
- 		fullFrame: (LayoutFrame fractions: (0 at 0 corner: 1.0 at 0.8) offsets: (0 at 60 corner: 0 at 0)).
- 
- 	text := PluggableTextMorph on: self 
- 			text: #contents accept: nil
- 			readSelection: nil menu: nil.
- 	self addMorph: text
- 		frame: (0 at 0.8 corner: 1.0 at 1.0).
  	text lock.
+ 	self setLabel: 'Zip Archive Viewer'!
- 
- 	self setLabel: 'Ned''s Zip Viewer'!

Item was added:
+ ----- Method: ArchiveViewer>>paddingAmount (in category 'private') -----
+ paddingAmount
+ 	^ 6.!



More information about the Squeak-dev mailing list