[squeak-dev] The Trunk: Tools-kfr.603.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Apr 26 13:26:18 UTC 2015


Karl Ramberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-kfr.603.mcz

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

Name: Tools-kfr.603
Author: kfr
Time: 26 April 2015, 3:25:51.325 pm
UUID: 3963fb45-68a1-9a4e-b9bb-1246b9dd482b
Ancestors: Tools-mt.602

changes to ArchiveViewer button layout to use standard button font.

=============== Diff against Tools-mt.602 ===============

Item was changed:
  ----- Method: ArchiveViewer>>createButtonBar (in category 'initialization') -----
  createButtonBar
+ 	| bar font |
+ 	font := Preferences standardButtonFont.
- 	| bar narrowFont registeredFonts |
- 	registeredFonts := OrderedCollection new.
- 	TextStyle knownTextStylesWithoutDefault do:
- 		[:st | (TextStyle named: st) fonts do: [:f | registeredFonts addLast: f]].		
- 	narrowFont := registeredFonts detectMin:
- 			[:ea | ea widthOfString: 'Contents' from: 1 to: 8].
  	bar := AlignmentMorph newRow.
  	bar
  		color: self defaultBackgroundColor;
  		rubberBandCells: false;
  		vResizing: #shrinkWrap;
  		cellInset: 6 @ 0.
+ 	#(#('new archive' #canCreateNewArchive #createNewArchive 'Create a new, empty archive and discard this one') #('load archive' #canOpenNewArchive #openNewArchive 'Open another archive and discard this one') #('save archive' #canSaveArchive #saveArchive 'Save this archive under a new name') #('extract all' #canExtractAll #extractAll 'Extract all this archive''s members into a directory') #('add file' #canAddMember #addMember 'Add a file to this archive') #('add clipboard' #canAddMember #addMemberFromClipboard 'Add the contents of the clipboard as a new file') #('add dir ' #canAddMember #addDirectory 'Add the entire contents of a directory, with all of its subdirectories') #('extract member' #canExtractMember #extractMember 'Extract the selected member to a file') #('delete member' #canDeleteMember #deleteMember 'Remove the selected member from this archive') #('rename member' #canRenameMember #renameMember 'Rename the selected member') #('view all' #canViewAllContents #changeViewAllContents 'Toggle the view of all the selected member''s contents')) 
- 	#(#('New\Archive' #canCreateNewArchive #createNewArchive 'Create a new, empty archive and discard this one') #('Load\Archive' #canOpenNewArchive #openNewArchive 'Open another archive and discard this one') #('Save\Archive As' #canSaveArchive #saveArchive 'Save this archive under a new name') #('Extract\All' #canExtractAll #extractAll 'Extract all this archive''s members into a directory') #('Add\File' #canAddMember #addMember 'Add a file to this archive') #('Add from\Clipboard' #canAddMember #addMemberFromClipboard 'Add the contents of the clipboard as a new file') #('Add\Directory' #canAddMember #addDirectory 'Add the entire contents of a directory, with all of its subdirectories') #('Extract\Member As' #canExtractMember #extractMember 'Extract the selected member to a file') #('Delete\Member' #canDeleteMember #deleteMember 'Remove the selected member from this archive') #('Rename\Member' #canRenameMember #renameMember 'Rename the selected member') #('View All\Contents' #canViewAllContents #changeViewAllContents 'Toggle the view of all the selected member''s contents')) 
  		do: 
  			[:arr | 
+ 			| button |
- 			| buttonLabel button |
- 			buttonLabel := (TextMorph new)
- 						string: arr first withCRs
- 							fontName: narrowFont familyName
- 							size: narrowFont pointSize
- 							wrap: false;
- 						hResizing: #shrinkWrap;
- 						lock;
- 						yourself.
  			(button := PluggableButtonMorph 
  						on: self
  						getState: arr second
  						action: arr third)
+ 				vResizing: #rigid;
- 				vResizing: #shrinkWrap;
  				hResizing: #spaceFill;
  				onColor: self buttonOnColor offColor: self buttonOffColor;
+ 				label: arr first withCRs;
- 				label: buttonLabel;
  				setBalloonText: arr fourth.
+ 			bar addMorphBack: button].
- 			bar addMorphBack: button.
- 			buttonLabel composeToBounds].
  	^bar!



More information about the Squeak-dev mailing list