[FIX]Preferences Panel disableDragNDrop
Karl Ramberg
karl.ramberg at chello.se
Mon Jun 26 14:41:18 UTC 2000
The top of the preferences panel accepted
dropped morphs. Not any more:-)
Karl
-------------- next part --------------
'From Squeak2.9alpha of 13 June 2000 [latest update: #2424] on 26 June 2000 at 4:36:52 pm'!
!Preferences class methodsFor: 'factored pref panel' stamp: 'kfr 6/26/2000 16:34'!
openFactoredPanelWithWidth: aWidth
"Preferences openFactoredPanelWithWidth: 325"
| tabbedPalette controlPage window playfield aColor aFont maxEntriesPerCategory tabsMorph anExtent |
aFont _ StrikeFont familyName: 'NewYork' size: 19.
aColor _ Color r: 0.645 g: 1.0 b: 1.0.
tabbedPalette _ TabbedPalette newSticky.
(tabsMorph _ tabbedPalette tabsMorph) color: aColor darker; highlightColor: Color red regularColor: Color brown darker darker; disableDragNDrop.
maxEntriesPerCategory _ 0.
"tabbedPalette addTabFor: self helpPaneForFactoredPanel font: aFont. LATER!!"
self factoredCategories do:
[:aCat |
controlPage _ AlignmentMorph newColumn beSticky color: aColor.
controlPage borderColor: aColor; inset: 4.
aCat second do:
[:aPrefSymbol |
controlPage addMorphBack:
(Preferences buttonRepresenting: aPrefSymbol wording: aPrefSymbol color: nil)].
controlPage setNameTo: aCat first asString.
aCat first == #halos ifTrue:
[self addHaloControlsTo: controlPage].
tabbedPalette addTabFor: controlPage font: aFont.
maxEntriesPerCategory _ maxEntriesPerCategory max: aCat second size].
tabbedPalette selectTabNamed: 'general'.
tabsMorph rowsNoWiderThan: aWidth.
playfield _ Morph newSticky.
anExtent _ aWidth @ (25 + tabsMorph height + (20 * maxEntriesPerCategory)).
playfield extent: anExtent.
playfield color: aColor.
playfield addMorphBack: tabbedPalette.
self couldOpenInMorphic
ifTrue:
[window _ (SystemWindow labelled: 'Preferences') model: nil.
window bounds: ((100 at 100- ((0 at window labelHeight) + window borderWidth))
extent: (playfield extent + (2 * window borderWidth))).
window addMorph: playfield frame: (0 at 0 extent: 1 at 1).
window updatePaneColors.
window setProperty: #minimumExtent toValue: (anExtent + (2 at 2)).
window position: 200 @ 20.
self currentHand attachMorph: window.
self currentWorld startSteppingSubmorphsOf: window]
ifFalse:
[(window _ MVCWiWPasteUpMorph newWorldForProject: nil) addMorph: playfield.
window startSteppingSubmorphsOf: playfield.
MorphWorldView openOn: window label: 'Preferences' extent: window fullBounds extent]
! !
More information about the Squeak-dev
mailing list
|