[squeak-dev] Squeak 6.0: Morphic-mt.2020.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Oct 11 08:15:34 UTC 2022
Marcel Taeumel uploaded a new version of Morphic to project Squeak 6.0:
http://source.squeak.org/squeak60/Morphic-mt.2020.mcz
==================== Summary ====================
Name: Morphic-mt.2020
Author: mt
Time: 11 October 2022, 10:15:32.222386 am
UUID: e02f7ecd-8324-a742-8040-786c9e0e89b5
Ancestors: Morphic-mt.2019
Backports Morphic-ct.2047 and Morphic-ct.2048 from 6.1alpha:
Morphic-ct.2047
Makes UpdatingStringMorph high-dpi-sensitive. Amongst others, this makes sure that halo labels are not truncated too early for large scale factors.
Morphic-ct.2048
Makes ScrollPane and MenuItemMorph high-dpi-sensitive. This also fixes some toolbuilding issues for huge scale factors (even though most default values (e.g., ScrollPane>>#defaultExtent) will be overridden by the ToolBuilder, they are still present before a morph is finally layouted).
=============== Diff against Morphic-mt.2019 ===============
Item was changed:
----- Method: MenuItemMorph>>defaultBounds (in category 'initialization') -----
defaultBounds
"answer the default bounds for the receiver"
+ ^ 0 @ 0 extent: (10 @ 10 * RealEstateAgent scaleFactor) truncated!
- ^ 0 @ 0 extent: 10 @ 10!
Item was changed:
----- Method: MenuItemMorph>>drawLabelOn: (in category 'drawing') -----
drawLabelOn: aCanvas
| stringBounds |
stringBounds := self bounds.
self hasIcon ifTrue: [
+ stringBounds := stringBounds left: stringBounds left + self iconForm width + (2 * RealEstateAgent scaleFactor) truncated ].
- stringBounds := stringBounds left: stringBounds left + self iconForm width + 2 ].
self hasMarker ifTrue: [
+ stringBounds := stringBounds left: stringBounds left + self submorphBounds width + (8 * RealEstateAgent scaleFactor) truncated ].
- stringBounds := stringBounds left: stringBounds left + self submorphBounds width + 8 ].
aCanvas
drawString: self contents
at: stringBounds left @ (stringBounds center y - (self fontToUse height // 2))
font: self fontToUse
color: self colorToUse.!
Item was changed:
----- Method: MenuItemMorph>>minHeight (in category 'layout') -----
minHeight
| iconHeight |
iconHeight := self hasIcon
+ ifTrue: [self icon height + (2 * RealEstateAgent scaleFactor) truncated]
- ifTrue: [self icon height + 2]
ifFalse: [0].
^ self fontToUse lineGridForMorphs max: iconHeight!
Item was changed:
----- Method: MenuItemMorph>>minWidth (in category 'layout') -----
minWidth
| subMenuWidth iconWidth markerWidth |
subMenuWidth := self hasSubMenu
ifTrue: [ 10 ]
ifFalse: [ 0 ].
iconWidth := self hasIcon
+ ifTrue: [ self icon width + (2 * RealEstateAgent scaleFactor) truncated ]
- ifTrue: [ self icon width + 2 ]
ifFalse: [ 0 ].
markerWidth := self hasMarker
+ ifTrue: [ self submorphBounds width + (8 * RealEstateAgent scaleFactor) truncated ]
- ifTrue: [ self submorphBounds width + 8 ]
ifFalse: [ 0 ].
^(self fontToUse widthOfString: contents)
+ subMenuWidth + iconWidth + markerWidth + self stringMargin!
Item was changed:
----- Method: NameStringInHalo>>placeContents (in category 'private') -----
placeContents
| namePosition |
(owner notNil and: [owner isInWorld]) ifTrue:
[namePosition := owner basicBox bottomCenter -
+ ((self width // 2) @ (owner handleSize negated // 2 - "1 * "RealEstateAgent scaleFactor truncated)).
+ namePosition := namePosition min: self world viewBox bottomRight - self extent y + (2 * RealEstateAgent scaleFactor) truncated.
- ((self width // 2) @ (owner handleSize negated // 2 - 1)).
- namePosition := namePosition min: self world viewBox bottomRight - self extent y + 2.
self bounds: (namePosition extent: self extent)]!
Item was changed:
----- Method: ScrollPane>>defaultExtent (in category 'initialization') -----
defaultExtent
+ ^ ((150 @ 120) * RealEstateAgent scaleFactor) truncated!
- ^150 at 120
- !
Item was changed:
----- Method: ScrollPane>>scrollDeltaHeight (in category 'geometry') -----
scrollDeltaHeight
"Return the increment in pixels which this pane should be scrolled (normally a subclass responsibility)."
+ ^ (10 * RealEstateAgent scaleFactor) truncated!
- ^ 10
- !
Item was changed:
----- Method: ScrollPane>>scrollDeltaWidth (in category 'geometry') -----
scrollDeltaWidth
"Return the increment in pixels which this pane should be scrolled (normally a subclass responsibility)."
+ ^ (10 * RealEstateAgent scaleFactor) truncated!
-
- ^10
- !
Item was added:
+ ----- Method: UpdatingStringMorph>>defaultMaximumWidth (in category 'initialization') -----
+ defaultMaximumWidth
+
+ ^ (366 * RealEstateAgent scaleFactor) truncated!
Item was added:
+ ----- Method: UpdatingStringMorph>>defaultMinimumWidth (in category 'initialization') -----
+ defaultMinimumWidth
+
+ ^ (8 * RealEstateAgent scaleFactor) truncated!
Item was changed:
----- Method: UpdatingStringMorph>>doneWithEdits (in category 'editing') -----
doneWithEdits
"If in a SyntaxMorph, shrink min width after editing"
| editor |
super doneWithEdits.
+ (owner respondsTo: #parseNode) ifTrue: [minimumWidth := self defaultMinimumWidth].
- (owner respondsTo: #parseNode) ifTrue: [minimumWidth := 8].
editor := (submorphs detect: [ :sm | sm isKindOf: StringMorphEditor ] ifNone: [ ^self ]).
editor delete.!
Item was changed:
----- Method: UpdatingStringMorph>>initialize (in category 'initialization') -----
initialize
"Initialize the receiver to have default values in its instance variables."
super initialize.
""
format := #default.
"formats: #string, #default"
target := getSelector := putSelector := nil.
floatPrecision := 1.
growable := true.
stepTime := nil.
autoAcceptOnFocusLoss := true.
+ minimumWidth := self defaultMinimumWidth.
+ maximumWidth := self defaultMaximumWidth.!
- minimumWidth := 8.
- maximumWidth := 366!
Item was changed:
----- Method: UpdatingStringMorph>>minWidth (in category 'accessing') -----
minWidth
"Answer the minimum width that the receiver can have. A nonzero value here keeps the receiver from degenerating into something that cannot ever be seen or touched again!! Obeyed by fitContents."
+ ^ minimumWidth ifNil: [minimumWidth := self defaultMinimumWidth]!
- ^ minimumWidth ifNil: [minimumWidth := 8]!
Item was changed:
----- Method: UpdatingStringMorph>>mouseDown: (in category 'event handling') -----
mouseDown: evt
"The mouse went down over the receiver. If appropriate, launch a mini-editor so that the user can commence text-editing here"
(owner wantsKeyboardFocusFor: self) ifTrue:
[self userEditsAllowed ifTrue:
[(owner respondsTo: #parseNode)
ifTrue: "leave space for editing"
+ [minimumWidth := ((49 * RealEstateAgent scaleFactor) truncated max: minimumWidth)].
- [minimumWidth := (49 max: minimumWidth)].
self launchMiniEditor: evt]]!
More information about the Squeak-dev
mailing list
|