Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1506.mcz
==================== Summary ====================
Name: Morphic-ct.1506
Author: ct
Time: 15 August 2019, 1:04:11.175584 am
UUID: e6ae0f1d-e19f-a74e-883a-8f916957c77a
Ancestors: Morphic-mt.1504
Respect global scaleFactor in SystemWindow boxes
Better blury than tiny. But it would be nice if someone could provide icons at higher scale :)
=============== Diff against Morphic-mt.1504 ===============
Item was changed:
----- Method: SystemWindow>>createBox: (in category 'initialization') -----
createBox: aForm
"create a button with a form to be used in the label area"
| box |
box := SystemWindowButton new.
box color: Color transparent;
target: self;
useSquareCorners;
borderWidth: 0;
+ labelGraphic: (aForm scaledIntoFormOfSize: self boxExtent * 0.75);
- labelGraphic: aForm;
extent: self boxExtent.
^ box!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1546.mcz
==================== Summary ====================
Name: Morphic-mt.1546
Author: mt
Time: 29 September 2019, 6:14:54.434524 pm
UUID: 9c2812f7-c5be-f44d-9903-b36cba3eb18c
Ancestors: Morphic-mt.1545
Make use of icon scaling from System-mt.1102.
Note that I also added a better fast path for not having icons in lists. Yet, our tools do set the icon selector regardless of the particular preference (e.g., class icons, message icons). We would have to update #buildWith: methods to make use of that fast path *BUT* we would not get nice live updates in existing tool windows anymore when toggling icon preferences. ... which is similar to other tool-builder artifacts we get when changing the font sizes (e.g. height of button rows).
=============== Diff against Morphic-mt.1545 ===============
Item was changed:
----- Method: LazyListMorph>>icon: (in category 'list access') -----
icon: row
| icon |
+ listSource canHaveIcons ifFalse: [^ nil].
+
- "Migrate old instances if necessary."
listIcons ifNil: [listIcons := Array new: listItems size].
row <= listIcons size ifFalse: [
^ self getListIcon: row].
(icon := listIcons at: row) ifNil: [
+ icon := (self getListIcon: row) ifNotNil: [:form | form scaleIconToDisplay].
- icon := self getListIcon: row.
listIcons at: row put: icon ].
^ icon!
Item was added:
+ ----- Method: PluggableListMorph>>canHaveIcons (in category 'testing') -----
+ canHaveIcons
+
+ ^ getIconSelector notNil!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1102.mcz
==================== Summary ====================
Name: System-mt.1102
Author: mt
Time: 29 September 2019, 6:09:57.735524 pm
UUID: 47e87e3c-e6c2-894e-941e-4d60407bf49b
Ancestors: System-mt.1101
Adds a simple, yet convenient, way to scale icons for demo/hi-dpi mode.
A no-scale takes about 150 nanoseconds on my machine, which should be okay --- performance-wise --- for existing tools. Maybe we can improve the code a little bit more for the default scale.
Note that one could also use icons with s higher resolution, which would then be down-scaled to the reference extent...
=============== Diff against System-mt.1101 ===============
Item was added:
+ ----- Method: Form>>scaleIconToDisplay (in category '*System-icon scaling') -----
+ scaleIconToDisplay
+ "Convenient way to scale icons up or down to match the current display scale factor. For performance reasons, does not return a copy if there is no scaling of the receiver necessary."
+
+ | scaleFactor referenceExtent |
+ scaleFactor := RealEstateAgent scaleFactor.
+ referenceExtent := RealEstateAgent defaultIconExtent.
+
+ "Scale down bigger icons to match the (scaled) reference extent. So you can use high-resolution icons that do not appear blurry."
+ self extent > referenceExtent ifTrue: [
+ ^ scaleFactor > 1.0
+ ifFalse: [self scaledToSize: referenceExtent]
+ ifTrue: [self scaledToSize: (((referenceExtent * scaleFactor) roundTo: 8) min: self extent)]].
+
+ "Scale up smaller icons."
+ ^ scaleFactor = 1.0
+ ifTrue: [self "Smaller than the default is okay if no scaling."]
+ ifFalse: [self scaledToSize: self extent * scaleFactor]!
Item was added:
+ ----- Method: RealEstateAgent class>>defaultIconExtent (in category 'display scale') -----
+ defaultIconExtent
+ "Scaling. Like in #scaleFactor, we need a reference extent for scaling icons."
+
+ ^ 16@16!
Item was changed:
+ ----- Method: RealEstateAgent class>>scaleFactor (in category 'display scale') -----
- ----- Method: RealEstateAgent class>>scaleFactor (in category 'framing') -----
scaleFactor
"Use the default font height to calculate some factor. Better than nothing..."
^ (TextStyle defaultFont height / 14 "reference value") * (Preferences bigDisplay ifTrue: [1.75] ifFalse: [1.0])!
Marcel Taeumel uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-ct.42.mcz
==================== Summary ====================
Name: 60Deprecated-ct.42
Author: ct
Time: 15 August 2019, 3:05:56.648584 am
UUID: 7497b09d-2e4d-c648-9f01-8577689f904b
Ancestors: 60Deprecated-mt.41
Mark #setAuthorInitials: with #deprecated:
Important: Before committing this to Trunk, please merge https://github.com/Metacello/metacello/pull/508
Let's see if this solves the problem ...
=============== Diff against 60Deprecated-mt.41 ===============
Item was changed:
----- Method: Utilities class>>setAuthorInitials: (in category '*60Deprecated-identification') -----
setAuthorInitials: aString
+ self deprecated: 'Use #authorInitials:.'.
- "mt: Not now (17/04/2018) for SmalltalkCI. See: https://github.com/hpi-swa/smalltalkCI/issues/368
- self deprecated: 'Use #authorInitials:.'."
-
self authorInitials: aString.!