[squeak-dev] The Trunk: Morphic-mt.1716.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Jan 24 18:03:57 UTC 2021
Hi Marcel,
thanks for these fixes! :-)
A few additional notes about DialogWindows in general:
* We should (finally) move the grips to the window border itself to make it consistent with regular windows.
* Grips & scrollbars are not hi-dpi-aware.
* The minimum extent of the DialogWindow title itself is neither, I think:
[cid:35e5cd17-a387-44d6-a6b7-467475958932]
:-)
<http://www.hpi.de/>
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Dienstag, 12. Januar 2021 14:52 Uhr
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Morphic-mt.1716.mcz
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1716.mcz
==================== Summary ====================
Name: Morphic-mt.1716
Author: mt
Time: 12 January 2021, 2:52:47.977356 pm
UUID: 93f95f53-4457-5e4c-a157-5cbf89aa7328
Ancestors: Morphic-mt.1715
Fixes a bug in resize grips (having #rigid targets) that are placed within layouted (usually #shrinkWrap) owners.
This makes all grips in resizable dialogs finally work as expected. I still consider this a #workaround to be improved.
=============== Diff against Morphic-mt.1715 ===============
Item was changed:
----- Method: BorderedMorph>>doFastWindowReframe: (in category 'resize handling') -----
doFastWindowReframe: ptName
+ | newBounds delta |
- | newBounds |
"For fast display, only higlight the rectangle during loop"
newBounds := self bounds newRectButtonPressedDo: [:f |
f
withSideOrCorner: ptName
setToPoint: (self pointFromWorld: Sensor cursorPoint)
minExtent: self minimumExtent].
+ delta := newBounds origin - self bounds origin.
self bounds: newBounds.
+ self flag: #workaround. "mt: Due to a layout-specific 'let us start in the top-left corner of a layout cell'-behavior, we have to go up the owner chain and propagate the delta. See Morph >> #layoutInBounds:positioning: and there section 1.2."
+ self allOwnersDo: [:owner |
+ owner layoutPolicy ifNotNil: [owner topLeft: owner topLeft + delta]].
^newBounds.!
Item was changed:
----- Method: BottomLeftGripMorph>>apply: (in category 'target resize') -----
apply: delta
| oldBounds |
oldBounds := self target bounds.
self target
+ bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y)).
+ self flag: #workaround. "mt: Due to a layout-specific 'let us start in the top-left corner of a layout cell'-behavior, we have to go up the owner chain and propagate the delta. See Morph >> #layoutInBounds:positioning: and there section 1.2."
+ self target allOwnersDo: [:owner |
+ owner layoutPolicy ifNotNil: [owner left: owner left + delta x]].!
- bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y))!
Item was changed:
----- Method: LeftGripMorph>>apply: (in category 'target resize') -----
apply: delta
| oldBounds |
oldBounds := self target bounds.
self target
+ bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner).
+ self flag: #workaround. "mt: Due to a layout-specific 'let us start in the top-left corner of a layout cell'-behavior, we have to go up the owner chain and propagate the delta. See Morph >> #layoutInBounds:positioning: and there section 1.2."
+ self target allOwnersDo: [:owner |
+ owner layoutPolicy ifNotNil: [owner left: owner left + delta x]].!
- bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner)!
Item was changed:
----- Method: TopGripMorph>>apply: (in category 'target resize') -----
apply: delta
| oldBounds |
oldBounds := self target bounds.
self target
+ bounds: (oldBounds origin + (0 @ delta y) corner: oldBounds corner).
+ self flag: #workaround. "mt: Due to a layout-specific 'let us start in the top-left corner of a layout cell'-behavior, we have to go up the owner chain and propagate the delta. See Morph >> #layoutInBounds:positioning: and there section 1.2."
+ self target allOwnersDo: [:owner |
+ owner layoutPolicy ifNotNil: [owner top: owner top + delta y]].!
- bounds: (oldBounds origin + (0 @ delta y) corner: oldBounds corner)!
Item was changed:
----- Method: TopLeftGripMorph>>apply: (in category 'target resize') -----
apply: delta
| oldBounds |
oldBounds := self target bounds.
self target
+ bounds: (oldBounds origin + delta corner: oldBounds corner).
+ self flag: #workaround. "mt: Due to a layout-specific 'let us start in the top-left corner of a layout cell'-behavior, we have to go up the owner chain and propagate the delta. See Morph >> #layoutInBounds:positioning: and there section 1.2."
+ self target allOwnersDo: [:owner |
+ owner layoutPolicy ifNotNil: [owner topLeft: owner topLeft + delta]].!
- bounds: (oldBounds origin + delta corner: oldBounds corner)!
Item was changed:
----- Method: TopRightGripMorph>>apply: (in category 'target resize') -----
apply: delta
| oldBounds |
oldBounds := self target bounds.
self target
+ bounds: (oldBounds origin + (0 at delta y) corner: oldBounds corner + (delta x @ 0)).
+ self flag: #workaround. "mt: Due to a layout-specific 'let us start in the top-left corner of a layout cell'-behavior, we have to go up the owner chain and propagate the delta. See Morph >> #layoutInBounds:positioning: and there section 1.2."
+ self target allOwnersDo: [:owner |
+ owner layoutPolicy ifNotNil: [owner top: owner top + delta y]].!
- bounds: (oldBounds origin + (0 at delta y) corner: oldBounds corner + (delta x @ 0))!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210124/6166ea1b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 6873 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210124/6166ea1b/attachment-0001.png>
More information about the Squeak-dev
mailing list
|