[squeak-dev] The Inbox: Morphic-ct.1842.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jan 17 11:45:46 UTC 2022


Looks good! Please merge. :-)

Best,
Marcel
Am 03.01.2022 23:36:50 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Hi Marcel, hi all,

I have sent this to the inbox because I am not sure whether it might be a better idea to implement #applyTo: on UserInterfaceThemeRequest instead as a forwarding message. Please give me a second opinion. :-)

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: Montag, 3. Januar 2022 23:35:03
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: Morphic-ct.1842.mcz
 
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1842.mcz [http://source.squeak.org/inbox/Morphic-ct.1842.mcz]

==================== Summary ====================

Name: Morphic-ct.1842
Author: ct
Time: 3 January 2022, 11:34:56.949397 pm
UUID: 2278fc82-96e5-7c47-a89f-99b0ad45d8a8
Ancestors: Morphic-ct.1841

Fixes a bug that prevented UI themes from being applied to collapsed windows.

"self userInterfaceTheme" answers a UserInterfaceThemeRequest rather than a UserInterfaceTheme, and sending #applyTo: to this request caused the local UI property "#applyTo" being set to "self allMorphs" rather than actually applying the UI theme.

=============== Diff against Morphic-ct.1841 ===============

Item was changed:
  ----- Method: SystemWindow>>collapseOrExpand (in category 'resize/collapse') -----
  collapseOrExpand
         "Collapse or expand the window, depending on existing state"
         | cf |
         isCollapsed
                 ifTrue:
                         ["Expand -- restore panes to morphics structure"
                         isCollapsed := false.
                         self beKeyWindow.  "Bring to frint first"
                         Preferences collapseWindowsInPlace
                                 ifTrue:
                                         [fullFrame := fullFrame align: fullFrame topLeft with: self getBoundsWithFlex topLeft]
                                 ifFalse:
                                         [collapsedFrame := self getBoundsWithFlex].
                         collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window' translated].
                         self setBoundsWithFlex: fullFrame.
                         paneMorphs reverseDo:
                                         [:m |  self addMorph: m unlock.
                                         self world startSteppingSubmorphsOf: m].
                         self addPaneSplitters.
                         (self hasProperty: #applyTheme) ifTrue: [
                                 self removeProperty: #applyTheme.
+                                UserInterfaceTheme current applyTo: self allMorphs]]
-                                self userInterfaceTheme applyTo: self allMorphs]]
                 ifFalse:
                         ["Collapse -- remove panes from morphics structure"
                         isCollapsed := true.
                         fullFrame := self getBoundsWithFlex.
                         "First save latest fullFrame"
                         paneMorphs do: [:m | m delete; releaseCachedState].
                         self removePaneSplitters.
                         self removeCornerGrips.
                         model modelSleep.
                         cf := self getCollapsedFrame.
                         (collapsedFrame isNil and: [Preferences collapseWindowsInPlace not]) ifTrue:
                                 [collapsedFrame := cf].
                         self setBoundsWithFlex: cf.
                         collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window' translated ].
                         expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated ].
                         self sendToBack].
         self layoutChanged!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220117/9dea67ae/attachment-0001.html>


More information about the Squeak-dev mailing list