[squeak-dev] The Trunk: Tools-mt.1132.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Feb 14 09:09:44 UTC 2022
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1132.mcz
==================== Summary ====================
Name: Tools-mt.1132
Author: mt
Time: 14 February 2022, 10:09:42.32981 am
UUID: d846ab41-af6e-6546-8abf-6965877811c5
Ancestors: Tools-ct.1131
Fixes appearance of MVC menus.
=============== Diff against Tools-ct.1131 ===============
Item was changed:
----- Method: PopUpMenu class>>standardMenuStyle (in category 'class initialization') -----
standardMenuStyle
^ (TextStyle fontArray: { Preferences standardMenuFont })
- gridForFont: 1 withLead: 0;
centered;
yourself!
Item was changed:
----- Method: PopUpMenu>>computeForm (in category 'private') -----
computeForm
"Compute and answer a Form to be displayed for this menu."
| borderInset paraForm menuForm menuStyle inside |
borderInset := 4 at 4.
menuStyle := self class standardMenuStyle.
paraForm := ((DisplayText text: labelString asText textStyle: menuStyle)
foregroundColor: (self userInterfaceTheme textColor ifNil: [Color black])
backgroundColor: (self userInterfaceTheme color ifNil: [Color white])) form.
menuForm := Form extent: paraForm extent + (borderInset * 2) depth: paraForm depth.
menuForm fill: (0 @ 0 extent: menuForm extent)
rule: Form over
fillColor: (self userInterfaceTheme color ifNil: [Color white]).
menuForm
border: menuForm boundingBox
width: 2
fillColor: (self userInterfaceTheme borderColor ifNil: [Color black]).
paraForm displayOn: menuForm at: borderInset.
lineArray == nil ifFalse:
[lineArray do:
[ :line |
menuForm
+ fill: (4 @ ((line * font lineGrid) + borderInset y)
- fill: (4 @ ((line * font height) + borderInset y)
extent: (menuForm width - 8 @ 1))
rule: Form over
fillColor: (self userInterfaceTheme lineColor ifNil: [Color black])]].
frame := Quadrangle new.
frame region: menuForm boundingBox.
frame borderWidth: 4.
inside := frame inside.
marker := inside topLeft extent: (inside width @ menuStyle lineGrid).
selection := 1.
^ form := menuForm
!
Item was changed:
----- Method: PopUpMenu>>markerTop: (in category 'marker adjustment') -----
markerTop: aPoint
"Answer aPoint, gridded to lines in the receiver."
+ ^(aPoint y - frame inside top truncateTo: font lineGrid) + frame inside top!
- ^(aPoint y - frame inside top truncateTo: font height) + frame inside top!
More information about the Squeak-dev
mailing list
|