The Trunk: Morphic-ct.2224.mcz

[email protected] Fri, 31 Jul 2026 08:47:04 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2224.mcz

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

Name: Morphic-ct.2224
Author: ct
Time: 28 July 2026, 10:03:42.279028 pm
UUID: 5d004ad2-fb3d-4e89-9f83-89e3f6720938
Ancestors: Morphic-mt.2222

Makes it possible to remove the label area of system windows. Adds missing checks for absence of the label area to avoid MNUs (there were already plenty    of other checks before). When changing the display scale factor, honors #wantsGrips before resetting layout inset.
Needed for MorphicExtras-ct.362 (revised Objectland starter).

=============== Diff against Morphic-mt.2222 ===============

Item was changed:
  ----- Method: SystemWindow>>applyUserInterfaceTheme (in category 'user interface') -----
  applyUserInterfaceTheme
  
  	super applyUserInterfaceTheme.
  	
+ 	self setDefaultParameters.
+ 	labelArea ifNotNil: [self replaceBoxes].
+ 	self refreshWindowColor.
- 	self
- 		setDefaultParameters;
- 		replaceBoxes;
- 		refreshWindowColor.
  
  	self isLookingFocused
  		ifTrue: [self lookUnfocused; lookFocused]
  		ifFalse: [self lookFocused; lookUnfocused].
  		
  	self isCollapsed ifTrue: [self setProperty: #applyTheme toValue: true].!

Item was changed:
  ----- Method: SystemWindow>>boxExtent (in category 'initialization') -----
  boxExtent
  	"the label height is used to be proportional to the fonts preferences"
  	
+ 	| boxExtent |
+ 	boxExtent := self class boxExtent.
+ 	label ifNil: [^ boxExtent].
+ 	^ boxExtent max: label height @ label height !
- 	^ self class boxExtent
- 		max: label height @ label height !

Item was changed:
  ----- Method: SystemWindow>>displayScaleChangedBy: (in category 'layout') -----
  displayScaleChangedBy: factor
  	"Overwritten to also update the label area and reset the #cellGap (and #splitters)."
  	
  	super displayScaleChangedBy: factor.
  
  	self cellGap: ProportionalSplitterMorph gripThickness.
+ 	self wantsGrips ifTrue: [
+ 		self layoutInset: ProportionalSplitterMorph gripThickness].
- 	self layoutInset: ProportionalSplitterMorph gripThickness.
  	
  	self setFramesForLabelArea.
  	"self replaceBoxes."!

Item was changed:
  ----- Method: SystemWindow>>initialize (in category 'initialization') -----
  initialize
  	"Initialize a system window. Add label, stripes, etc., if desired"
  
  	super initialize.
  
  	allowReframeHandles := true.
  	isCollapsed := false.
  	paneMorphs := Array new.
  	mustNotClose := false.
  	updatablePanes := Array new.
  
  	self layoutPolicy: ProportionalLayout new.
  
  	self wantsPaneSplitters: true.
  	self wantsGrips: true.
- 	self layoutInset: ProportionalSplitterMorph gripThickness.
  	self cellGap: ProportionalSplitterMorph gripThickness.
  
  	self initializeLabelArea.				
  	self addGrips.
  	self setDefaultParameters.
  
  	self initializeKeyboardShortcuts.!

Item was added:
+ ----- Method: SystemWindow>>removeLabelArea (in category 'initialization') -----
+ removeLabelArea
+ 
+ 	labelArea ifNil: [^ self].
+ 	
+ 	labelArea abandon.
+ 	labelArea := nil.
+ 	label abandon.
+ 	label := nil.
+ 	closeBox := collapseBox := menuBox := expandBox := nil.
+ 	stripes := nil.!

Item was changed:
  ----- Method: SystemWindow>>replaceBoxes (in category 'initialization') -----
  replaceBoxes
  	"Rebuild the various boxes."
+ 	labelArea ifNotNil: [self setLabelWidgetAllowance].
- 	self setLabelWidgetAllowance.
  	label ifNotNil: [label delete].
  	labelArea ifNotNil: [labelArea delete].
  	self initializeLabelArea.
  	self setFramesForLabelArea.
  	self setWindowColor: self paneColor.
  	self isActive
  		ifTrue: [self passivate; activate]
  		ifFalse: [self activate; passivate].!

Item was changed:
  ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  
  	Preferences menuAppearance3d
  		ifFalse: [self hasDropShadow: false]
  		ifTrue: [
  			self addDropShadow.
  			self hasDropShadow: self isKeyWindow. "maybe turn off again"].
  	
  	self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]) px.
+ 	label ifNotNil: [
+ 		label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont])].!
- 	label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!

Item was added:
+ ----- Method: SystemWindow>>wantsGrips: (in category 'resize/collapse') -----
+ wantsGrips: aBoolean
+ 
+ 	super wantsGrips: aBoolean.
+ 	
+ 	self layoutInset: (aBoolean
+ 		ifTrue: [ProportionalSplitterMorph gripThickness]
+ 		ifFalse: [0]).!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]