Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1914.mcz
==================== Summary ====================
Name: Morphic-mt.1914
Author: mt
Time: 28 February 2022, 12:43:57.322532 pm
UUID: 5f3c3711-be3d-46f3-994e-446ca3c415db
Ancestors: Morphic-mt.1913
Removes the 'allButtons' hack from PluggableButtonMorph because it was in serious conflict with how layouting and event dispatching works (e.g. #visible: and #disableLayout:) in Morphic.
=============== Diff against Morphic-mt.1913 ===============
Item was changed:
Morph subclass: #PluggableButtonMorph
+ instanceVariableNames: 'model label font getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown offColor onColor feedbackColor showSelectionFeedback arguments argumentsProvider argumentsSelector style hoverColor borderColor textColor labelOffset wantsGradient'
- instanceVariableNames: 'model label font getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown offColor onColor feedbackColor showSelectionFeedback allButtons arguments argumentsProvider argumentsSelector style hoverColor borderColor textColor labelOffset wantsGradient'
classVariableNames: 'GradientButton RoundedButtonCorners'
poolDictionaries: ''
category: 'Morphic-Pluggable Widgets'!
!PluggableButtonMorph commentStamp: '<historical>' prior: 0!
A PluggableButtonMorph is a combination of an indicator for a boolean value stored in its model and an action button. The action of a button is often, but not always, to toggle the boolean value that it shows. Its pluggable selectors are:
getStateSelector fetch a boolean value from the model
actionSelector invoke this button's action on the model
getLabelSelector fetch this button's lable from the model
getMenuSelector fetch a pop-up menu for this button from the model
Any of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. For example, if getStateSelector is nil, then this button shows the state of a read-only boolean that is always false.
The model informs its view(s) of changes by sending #changed: to itself with getStateSelector as a parameter. The view tells the model when the button is pressed by sending actionSelector.
If the actionSelector takes one or more arguments, then the following are relevant:
arguments A list of arguments to provide when the actionSelector is called.
argumentsProvider The object that is sent the argumentSelector to obtain arguments, if dynamic
argumentsSelector The message sent to the argumentProvider to obtain the arguments.
Options:
askBeforeChanging have model ask user before allowing a change that could lose edits
triggerOnMouseDown do this button's action on mouse down (vs. up) transition
shortcutCharacter a place to record an optional shortcut key
!
Item was changed:
----- Method: PluggableButtonMorph>>mouseDown: (in category 'event handling') -----
mouseDown: evt
- "Details: If this button is triggered on mouse down or the event is the menu gesture, handle it immediately. Otherwise, make a list of buttons (including the receiver) for mouseMove feedback. This allows a simple radio-button effect among the button submorphs of a given morph."
- allButtons := nil.
evt yellowButtonPressed ifTrue: [^ self invokeMenu: evt].
triggerOnMouseDown
ifTrue: [self performAction]
+ ifFalse: [self updateFillStyle: evt].
- ifFalse: [
- allButtons := owner submorphs select: [:m | m class = self class].
- self updateFillStyle: evt].
!
Item was changed:
----- Method: PluggableButtonMorph>>mouseMove: (in category 'event handling') -----
mouseMove: evt
+ self updateFillStyle: evt.!
- allButtons ifNil: [^ self].
- allButtons do: [:m | m updateFillStyle: evt].!
Item was changed:
----- Method: PluggableButtonMorph>>mouseUp: (in category 'event handling') -----
mouseUp: evt
self updateFillStyle: evt.
+ (self containsPoint: evt cursorPoint)
+ ifTrue: [self performAction].!
-
- allButtons ifNil: [^ self].
- allButtons do: [:m |
- (m containsPoint: evt cursorPoint) ifTrue: [m performAction]].
- allButtons := nil.
- self changed.
- !
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1913.mcz
==================== Summary ====================
Name: Morphic-mt.1913
Author: mt
Time: 28 February 2022, 11:19:33.058532 am
UUID: a6a11681-f9b0-4ab7-9da6-a8411611639a
Ancestors: Morphic-mt.1912
Fixes a regression in text-cursor (i.e. caret) visibility. It is now visible again during type-in, not blinking.
I removed the extra #hasFocus check in the caret's display routines. Now we notice some inconsistency in caret management when building new paragraphs. There are still some extra carets visible after tool construction I have to figure out. It might be related to unnecessary editor instances...
=============== Diff against Morphic-mt.1912 ===============
Item was changed:
----- Method: NewParagraph>>showCaret (in category 'access') -----
showCaret
+ ^showCaret ifNil:[true]
- ^showCaret ifNil:[false]
!
Item was changed:
----- Method: TextMorph>>createParagraph (in category 'private') -----
createParagraph
self setProperty: #CreatingParagraph toValue: true.
[
self setDefaultContentsIfNil.
"...Code here to recreate the paragraph..."
paragraph := (self paragraphClass new textOwner: self owner).
paragraph wantsColumnBreaks: successor notNil.
paragraph
compose: text
style: textStyle
from: self startingIndex
in: self container.
wrapFlag ifFalse:
["Was given huge container at first... now adjust"
paragraph adjustRightX].
paragraph focused: (self currentHand keyboardFocus == self).
paragraph
+ showCaret: self hasFocus;
caretColor: self caretColor;
selectionColor: self selectionColor;
unfocusedSelectionColor: self unfocusedSelectionColor.
self fit.
] ensure: [self removeProperty: #CreatingParagraph].
^ paragraph!
Marcel Taeumel uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-mt.76.mcz
==================== Summary ====================
Name: TrueType-mt.76
Author: mt
Time: 28 February 2022, 9:59:16.762504 am
UUID: 36d27c31-4d56-4248-a6d2-de0a9dbdc3da
Ancestors: TrueType-mt.75
Complement Graphics-mt.488.
=============== Diff against TrueType-mt.75 ===============
Item was changed:
----- Method: TTCFont class>>shutDown: (in category 'class initialization') -----
shutDown: quitting
+ "Only flush the cache on save-and-quit unless overridden by #compressOnSnapshot preference. This means that the image will be slightly larger when save-no-quit. Yet, it makes sense to keep up the font rendering performance when the user keeps on working."
- "Only flush the cache on save-and-quit. This means that the image will be slightly larger when save-no-quit. Yet, it makes sense to keep up the font rendering performance when the user keeps on working. Or does it?"
"Flush the glyph cache"
+ (quitting or: [Form compressOnSnapshot]) ifFalse: [^ self].
- quitting ifFalse: [^ self].
GlyphCacheData atAllPut: nil.
GlyphCacheIndex := 0.
ShutdownList ifNotNil:[ShutdownList do:[:fnt| fnt flushCache]].
ShutdownList := WeakSet new.
!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.488.mcz
==================== Summary ====================
Name: Graphics-mt.488
Author: mt
Time: 28 February 2022, 9:57:52.349504 am
UUID: 6a3701f5-fea3-4e1f-9d66-005169bbfb5e
Ancestors: Graphics-mt.487
Make it a preference whether to compress all graphics data or not when snapshotting but not quitting. Keep the default as it always was: compress graphics data to reduce .image file size.
=============== Diff against Graphics-mt.487 ===============
Item was changed:
DisplayMedium subclass: #Form
instanceVariableNames: 'bits width height depth offset'
+ classVariableNames: 'CompressOnSnapshot'
- classVariableNames: ''
poolDictionaries: ''
category: 'Graphics-Display Objects'!
!Form commentStamp: 'cbc 5/5/2017 10:07' prior: 0!
A rectangular array of pixels, used for holding images. All pictures, including character images are Forms. The depth of a Form is how many bits are used to specify the color at each pixel. The actual bits are held in a Bitmap, whose internal structure is different at each depth. Class Color allows you to deal with colors without knowing how they are actually encoded inside a Bitmap.
The supported depths (in bits) are 1, 2, 4, 8, 16, and 32. The number of actual colors at these depths are: 2, 4, 16, 256, 32768, and 16 million.
Forms are indexed starting at 0 instead of 1; thus, the top-left pixel of a Form has coordinates 0@0.
Forms are combined using BitBlt. See the comment in class BitBlt. Forms that repeat many times to fill a large destination are InfiniteForms.
colorAt: x@y Returns the abstract Color at this location
displayAt: x@y shows this form on the screen
displayOn: aMedium at: x@y shows this form in a Window, a Form, or other DisplayMedium
fillColor: aColor Set all the pixels to the color.
edit launch an editor to change the bits of this form.
pixelValueAt: x@y The encoded color. The encoding depends on the depth.
Note: If you want to hook up other external forms/displayScreens, please look at the (successful) Graphics-External package in http://www.squeaksource.com/Balloon3D.!
Item was added:
+ ----- Method: Form class>>compressOnSnapshot (in category 'preferences') -----
+ compressOnSnapshot
+ <preference: 'Always compress graphics data on snapshot'
+ categoryList: #(performance Graphics)
+ description: 'When enabled, graphics data such as all instances of Form are compressed during image snapshots -- even when the image will not quit after the snapshot. This includes cache clean-up such as the TrueType glyph cache. Disable to avoid render lags after snapshots at the cost of a bigger footprint of your .image file. Note that snapshot-and-quit always compresses graphics data.'
+ type: #Boolean>
+
+ ^ CompressOnSnapshot ifNil: [true]!
Item was added:
+ ----- Method: Form class>>compressOnSnapshot: (in category 'preferences') -----
+ compressOnSnapshot: aBoolean
+
+ CompressOnSnapshot := aBoolean.!
Item was changed:
----- Method: Form class>>shutDown: (in category 'shut down') -----
shutDown: quitting
+ "When quitting, compress all instances in the system. Will decompress on demand after start-up. Note that #compressOnShapshot can avoid hibernating forms during no-quit snapshotting to keep the system as responsive as possible directly after."
- "When quitting, compress all instances in the system. Will decompress on demand after start-up. Note that we avoid hibernating forms during no-quit snapshotting to keep the system as responsive as possible directly after."
"Form shutDown: true"
+ (quitting or: [self compressOnSnapshot]) ifTrue: [
- quitting ifTrue: [
Form allInstancesDo: [:f | f hibernate].
ColorForm allInstancesDo: [:f | f hibernate]].!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1912.mcz
==================== Summary ====================
Name: Morphic-mt.1912
Author: mt
Time: 27 February 2022, 10:23:42.921069 am
UUID: d7cb5bf3-f530-a54c-854c-232ecc5d5236
Ancestors: Morphic-mt.1911
For any new text field, the caret should not be visible because we assume that its has not yet gotten the input focus.
=============== Diff against Morphic-mt.1911 ===============
Item was changed:
----- Method: NewParagraph>>showCaret (in category 'access') -----
showCaret
+ ^showCaret ifNil:[false]
- ^showCaret ifNil:[true]
!
Christoph Thiede uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1137.mcz
==================== Summary ====================
Name: Tools-ct.1137
Author: ct
Time: 27 February 2022, 12:36:01.823424 am
UUID: d030f7cb-5802-e94d-be35-d119d34f8255
Ancestors: Tools-mt.1135
When renaming a changeset and canceling the name dialog/not entering a new name, do not play an error sound. The user has decided to do nothing, so there is no reason to indicate another error.
=============== Diff against Tools-mt.1135 ===============
Item was changed:
----- Method: ChangeSorter>>rename (in category 'changeSet menu') -----
rename
"Store a new name string into the selected ChangeSet. reject duplicate name; allow user to back out"
| newName |
newName := Project uiManager request: 'New name for this change set' translated
initialAnswer: myChangeSet name.
(newName = myChangeSet name or: [newName size = 0]) ifTrue:
+ [^ self].
- [^ Beeper beep].
(ChangeSet named: newName) ifNotNil:
[^ Project uiManager inform: 'Sorry that name is already used' translated].
myChangeSet name: newName.
self update.
self changed: #mainButtonName.
self changed: #relabel.!
Tony Garnock-Jones uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tonyg.1910.mcz
==================== Summary ====================
Name: Morphic-tonyg.1910
Author: tonyg
Time: 26 February 2022, 5:13:47.127408 pm
UUID: 5663b671-63a4-4185-8750-5606cd79c3d9
Ancestors: Morphic-ct.1909
Do not show keyboard help (a balloon) if Preferences balloonHelpEnabled is false.
=============== Diff against Morphic-ct.1909 ===============
Item was changed:
----- Method: MenuMorph>>showKeyboardHelp (in category 'keystroke helpers') -----
showKeyboardHelp
| help |
+
+ Preferences balloonHelpEnabled ifFalse: [^ self].
+
help := self balloonMorphClass
string: 'Enter text to narrow selection\down to matching items' translated withCRs
for: self
corner: #topLeft.
help popUpAt: self topCenter forHand: self activeHand!