"jumping" in preferences panel (was Re: New 3.0 gamma imageavailable for test)

Scott Wallace Scott.Wallace at disney.com
Sat Feb 17 13:21:57 UTC 2001


At 3:57 PM -0500 2/15/01, Doug Way wrote:
>Nice-to-have fixes:
>
>- "Search Preferences for:" in preferences window does a weird 
>re-centering every time you move over the entry field after opening 
>a prefs window.  (Centering of this and the buttons isn't accurate 
>with respect to the window, either.)

I've posted an update to the internal SqC servers that fixes these problems.

I actually never did understand why the jump happened -- nor 
seemingly did anyone on the Squeak list who may have looked into this 
-- but I found that by making the font of the topmost TextMorph 
sufficiently small, I could preclude it.

(Anyone with idle time to burn is invited to make the font of the 
"Search Preferences For..." string big again in the creation method, 
thus reintroducing the problem, and see if they can track down what's 
happening.  Let me know if you find anything out.)

The update eliminates the jump and also improves the centering of the 
"help pane" of the preferences panel.

It is probably too late to get this change onto the stp cd, since I 
think Dan may possibly have tied a ribbon on the release by now, but 
I attach a copy of the update here in case anyone wants early relief 
of the annoyances, and in case stp might want to bring it into the 
release image on his cd even if it doesn't make its way into the 
final file that Dan gives him.

   --  Scott


-----

'From Squeak3.1alpha of 5 February 2001 [latest update: #3625] on 17 
February 2001 at 5:02:54 am'!
"Change Set:		prefAnnoyances-sw
Date:			17 February 2001
Author:			Scott Wallace

Improves the centering in the help pane of the preferences panel, and 
eliminates the 'jumping' effect when the mouse first goes over the 
type-in pane of the help pane"!


!PreferencesPanel methodsFor: 'find' stamp: 'sw 2/17/2001 04:56'!
addHelpItemsTo: panelPage
	"Add special items to the page"

	| aButton aTextMorph aMorph firstTextMorph |
	panelPage hResizing: #shrinkWrap; vResizing: #shrinkWrap.
	firstTextMorph _  TextMorph new contents: 'Search Preferences for:'.
	firstTextMorph beAllFont: ((TextStyle default fontOfSize: 13) 
emphasized: 1).
	panelPage addMorphBack: firstTextMorph lock.
	panelPage addTransparentSpacerOfSize: 0 at 10.

	aMorph _ RectangleMorph new clipSubmorphs: true; 
beTransparent; borderWidth: 2; borderColor: Color black; extent: 250 
@ 36.
	aMorph vResizing: #rigid; hResizing: #rigid.
	aTextMorph _  PluggableTextMorph new
				on: self
				text: #searchString
				accept: #setSearchStringTo:
				readSelection: nil
				menu: nil.
"	aTextMorph hResizing: #rigid."
	aTextMorph borderWidth: 0.
	aTextMorph font: ((TextStyle default fontOfSize: 21) 
emphasized: 1); setTextColor: Color red.
	aMorph addMorphBack: aTextMorph.
	aTextMorph acceptOnCR: true.
	aMorph clipLayoutCells: true.
	aTextMorph width: 250.
	panelPage addMorphBack: aMorph.
	aTextMorph setBalloonText: 'Type what you want to search for 
here, then hit the "Search" button'.
	panelPage addTransparentSpacerOfSize: 0 at 10.

	aButton _ SimpleButtonMorph new target: self; color: Color 
transparent; actionSelector: #initiateSearch:; arguments: 
{aTextMorph}; label: 'Search'.
	panelPage addMorphBack: aButton.
	aButton setBalloonText: 'Type what you want to search for in 
the box above, then click here (or hit RETURN or ENTER) to start the 
search; results will appear in the "search results" category.'.

	panelPage addTransparentSpacerOfSize: 0 at 40.
	panelPage addMorphBack: (SimpleButtonMorph new color: Color 
transparent; label: 'Restore all Default Preference Settings'; 
target: Preferences; actionSelector: #chooseInitialSettings; 
setBalloonText: 'Click here to reset all the preferences to their 
standard default values.'; yourself).

	panelPage addTransparentSpacerOfSize: 0 at 14.
	panelPage addMorphBack: (SimpleButtonMorph new color: Color 
transparent; label:
'Save Current Settings as my Personal Preferences';
		target: Preferences; actionSelector: 
#savePersonalPreferences; setBalloonText: 'Click here to save the 
current constellation of Preferences settings as your personal 
defaults; you can get them all reinstalled with a single gesture by 
clicking the "Restore my Personal Preferences".'; yourself).

	panelPage addTransparentSpacerOfSize: 0 at 14.
	panelPage addMorphBack: (SimpleButtonMorph new color: Color 
transparent; label: 'Restore my Personal Preferences'; target: 
Preferences; actionSelector: #restorePersonalPreferences; 
setBalloonText: 'Click here to reset all the preferences to their 
values in your Personal Preferences.'; yourself).

	panelPage addTransparentSpacerOfSize: 0 at 30.

	panelPage addMorphBack: (SimpleButtonMorph new color: Color 
transparent; label: 'Inspect Parameters'; target: Preferences; 
actionSelector: #inspectParameters; setBalloonText: 'Click here to 
view all the values stored in the system Parameters dictionary'; 
yourself).

	panelPage addTransparentSpacerOfSize: 0 at 10.

	panelPage addMorphBack: (SimpleButtonMorph new color: Color 
transparent; label: 'Help!!'; target: Preferences; actionSelector: 
#giveHelpWithPreferences; setBalloonText: 'Click here to get some 
hints on use of this Preferences Panel'; yourself).
	panelPage wrapCentering: #center.
! !





More information about the Squeak-dev mailing list