On Mon, 1 Oct 2001 19:15:03 -0500 Daniel Joyce daniel.a.joyce@att.net wrote:
Hard coded extents, or improper clipping cause all sorts of text/buttons/etc to appear outside the bounds of their containing morphs.
FWIW clipping of submorphs is not a general property of Morphic in Squeak. A few morphs (transformation morphs, e.g.) do clip their submorphs, but most simply don't and I think that is intentional and desirable.
Cheers, Bob
On Sunday 30 September 2001 09:39 pm, you wrote:
On Mon, 1 Oct 2001 19:15:03 -0500 Daniel Joyce daniel.a.joyce@att.net
wrote:
Hard coded extents, or improper clipping cause all sorts of text/buttons/etc to appear outside the bounds of their containing morphs.
FWIW clipping of submorphs is not a general property of Morphic in Squeak. A few morphs (transformation morphs, e.g.) do clip their submorphs, but most simply don't and I think that is intentional and desirable.
Cheers, Bob
It is not desirable if you use larger fonts. Too many windows assume 12 pt as the normal size, and are hardcoded for that.
With a 22 pt font ( needed for 1280x1024, so I can read stuff ), the text runs outside a lot of buttons, and it looks very unprofessional and hackish.
I can resize fonts in Gnome, KDE, and Windows, and the buttons resive with them.
Squeak has too many hardcoded extents, and morphs that aren't smart enough to resize properly.
If Squeak is ever going to be taken seriously as a environment by outsiders, it needs to look professional.
Not clipping submorphs is silly. Have you ever seen text appear outside the window/widget/button that contains it on Win95/KDE/Gnome? I haven't.
Heck, Microsoft got this right in Windows 3.1.
Why can't we?
I've attached a jpg of the problem(s).
-Daniel
On Monday 01 October 2001 08:32 pm, Daniel Joyce wrote:
It is not desirable if you use larger fonts. Too many windows assume 12 pt as the normal size, and are hardcoded for that.
With a 22 pt font ( needed for 1280x1024, so I can read stuff ), the text runs outside a lot of buttons, and it looks very unprofessional and hackish.
I can resize fonts in Gnome, KDE, and Windows, and the buttons resive with them.
Squeak has too many hardcoded extents, and morphs that aren't smart enough to resize properly.
If Squeak is ever going to be taken seriously as a environment by outsiders, it needs to look professional.
Not clipping submorphs is silly. Have you ever seen text appear outside the window/widget/button that contains it on Win95/KDE/Gnome? I haven't.
The text isn't appearing outside the button, as far as I can tell. Adding self clipSubmorphs: true to the end of PluggableButtonMorph>>initialize doesn't help.
What's happening is that the button itself isn't being clipped by the AlignmentMorph that it's living inside (in the SystemWindow pane).
The case of the switches in the Browser can be fixed easily by making the AlignmentMorph clip its submorphs:
Browser>>buildMorphicSwitches
| instanceSwitch divider1 divider2 commentSwitch classSwitch row aColor |
instanceSwitch _ PluggableButtonMorph on: self getState: #instanceMessagesIndicated action: #indicateInstanceMessages. instanceSwitch label: 'instance'; askBeforeChanging: true; borderWidth: 0. commentSwitch _ PluggableButtonMorph on: self getState: #classCommentIndicated action: #plusButtonHit. commentSwitch label: '?' asText allBold; askBeforeChanging: true; setBalloonText: 'class comment'; borderWidth: 0. classSwitch _ PluggableButtonMorph on: self getState: #classMessagesIndicated action: #indicateClassMessages. classSwitch label: 'class'; askBeforeChanging: true; borderWidth: 0. divider1 := BorderedSubpaneDividerMorph vertical. divider2 := BorderedSubpaneDividerMorph vertical. Preferences alternativeWindowLook ifTrue:[ divider1 extent: 4@4; borderWidth: 2; borderRaised; color: Color transparent. divider2 extent: 4@4; borderWidth: 2; borderRaised; color: Color transparent. ]. row _ AlignmentMorph newRow clipSubmorphs: true; " added by NK" hResizing: #spaceFill; vResizing: #spaceFill; layoutInset: 0; borderWidth: 0; addMorphBack: instanceSwitch; addMorphBack: divider1; addMorphBack: commentSwitch; addMorphBack: divider2; addMorphBack: classSwitch.
aColor _ Color colorFrom: self defaultBackgroundColor. Preferences alternativeWindowLook ifTrue:[aColor _ Color white]. {instanceSwitch. commentSwitch. classSwitch} do: [:m | m color: aColor; onColor: aColor darker offColor: aColor; hResizing: #spaceFill; vResizing: #spaceFill. ].
^ row
I wouldn't be surprised if similar fixes weren't possible for other similar problems.
It would be nice if someone chased down all the hard-coded extents and made them relative to the appropriate font. Though that would make some UI's unusable if you changed fonts (like my ArchiveViewer, with its wordy little buttons).
squeak-dev@lists.squeakfoundation.org