[ANN] 7024... SmallLand :)

astares at gmx.de astares at gmx.de
Mon Apr 24 18:10:39 UTC 2006


Hi,

attached is a small change I would like to see incorporated.
It makes the border for the title area of menues a little 
bit smaller and uses a squared corner. 
Looks not so intrusive like the one in 3.9#7024

See
http://img373.imageshack.us/img373/2050/menumorph0ub.png
for a preview

Maybe Diego is able to repaint the "pin" shape similar
to the aliased icons in the main docking bar - so that
the white pixels will go away.

Thx
Torsten

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
-------------- next part --------------
'From Squeak3.9alpha of 4 July 2005 [latest update: #7024] on 24 April 2006 at 8:00:15 pm'!

!MenuMorph methodsFor: 'construction' stamp: 'tbn 4/24/2006 19:59'!
addTitle: aString icon: aForm updatingSelector: aSelector updateTarget: aTarget 
	"Add a title line at the top of this menu Make aString its initial  
	contents.  
	If aSelector is not nil, then periodically obtain fresh values for  
	its  
	contents by sending aSelector to aTarget.."
	| title titleContainer |
	title := AlignmentMorph newColumn.
	self setTitleParametersFor: title.
	""
	aForm isNil
		ifTrue: [titleContainer := title]
		ifFalse: [| pair | 
			pair := AlignmentMorph newRow.

			pair color: Color transparent.
			pair hResizing: #shrinkWrap.
			pair layoutInset: 0.
			""
			pair addMorphBack: aForm asMorph.
			""
			titleContainer := AlignmentMorph newColumn.
			titleContainer color: Color transparent.
			titleContainer vResizing: #shrinkWrap.
			titleContainer wrapCentering: #center.
			titleContainer cellPositioning: #topCenter.
			titleContainer layoutInset: 0.
			pair addMorphBack: titleContainer.
			""
			title addMorphBack: pair].
	""
	aSelector
		ifNil: [""
			aString asString
				linesDo: [:line | titleContainer
						addMorphBack: (StringMorph contents: line font: Preferences standardMenuFont)]]
		ifNotNil: [| usm | 
			usm := UpdatingStringMorph on: aTarget selector: aSelector.
			usm font: Preferences standardMenuFont.
			usm useStringFormat.
			usm lock.
			titleContainer addMorphBack: usm].
	""
	title setProperty: #titleString toValue: aString.
	self addMorphFront: title.
	""
	title borderWidth: 1.
	title useSquareCorners.
	(self hasProperty: #needsTitlebarWidgets)
		ifTrue: [self addStayUpIcons]! !


More information about the Squeak-dev mailing list