The Trunk: Morphic-mt.2231.mcz

[email protected]
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-mt.2231.mcz

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

Name: Morphic-mt.2231
Author: mt
Time: 5 August 2026, 1:29:19.557172 pm
UUID: 2794eac1-c5dd-9f4b-87d5-d6301ec44150
Ancestors: Morphic-mt.2230

Fixes recent regression in icon scaling for menu morphs. In particular, the Squeak logo got small when switching UI themes.

There is a race condition between reconstruction of docking-bar menus and stay-up regular menus, which we will sort out later. For now, the docking bar must work when switching themes.

Make spacing between menu items in world-main-docking-bar react to the scale factor. Note that 100% might now look closer together while 200% is unchanged.

=============== Diff against Morphic-mt.2230 ===============

Item was changed:
  ----- Method: MenuItemMorph>>applyUserInterfaceTheme (in category 'updating') -----
  applyUserInterfaceTheme
  
  	super applyUserInterfaceTheme.
  	
  	self
  		color: (self userInterfaceTheme textColor ifNil: [Color black]);
  		font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]).
+ 	!
- 	self icon ifNotNil: [self icon: self icon scaleIconToDisplay] "forth and back will be blurry, though".
- 	self submorphs
- 		detect: [:m | m isImageMorph]
- 		ifFound: [:marker |
- 			marker image: marker image scaleIconToDisplay.
- 			marker position: self left @ (self top + 2 px)].!

Item was changed:
  ----- Method: MenuItemMorph>>minWidth (in category 'layout') -----
  minWidth
  
  	| subMenuWidth iconWidth markerWidth |
  	subMenuWidth := self hasSubMenu
+ 		ifTrue: [ 5 px ]
- 		ifTrue: [ 10 ]
  		ifFalse: [ 0 ].
  	iconWidth := self hasIcon
  		ifTrue: [ self icon width + 2 px ]
  		ifFalse: [ 0 ].
  	markerWidth := self hasMarker
  		ifTrue: [ self submorphBounds width + 8 px ]
  		ifFalse: [ 0 ].
  	^(self fontToUse widthOfString: contents)
  		+ subMenuWidth + iconWidth + markerWidth + self stringMargin!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.