The Inbox: Morphic-ct.1769.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Morphic-ct.1769.mcz

commits-2
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1769.mcz

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

Name: Morphic-ct.1769
Author: ct
Time: 1 May 2021, 2:12:17.510389 pm
UUID: aa271c07-344a-324a-afe4-3950d6c00839
Ancestors: Morphic-mt.1767

Make SystemWindow's paneColor more robust against missing models. Avoid translucent color.

=============== Diff against Morphic-mt.1767 ===============

Item was changed:
  ----- Method: SystemWindow>>paneColor (in category 'colors') -----
  paneColor
  | cc |
  (cc := self valueOfProperty: #paneColor) ifNotNil: [^cc].
  (model respondsTo: #windowColorToUse) ifTrue: [cc := model windowColorToUse].
+ cc ifNil: [cc := paneMorphs
+ detect: [:morph | morph color isTransparent not]
+ ifFound: [:morph | morph color asNontranslucentColor]
+ ifNone: [nil]].
- cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]].
  cc ifNil: [cc := self defaultColor].
  self paneColor: cc.
  ^cc!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1769.mcz

marcel.taeumel
Avoid translucent color.

Why? I did cut out the drop shadow. Translucent windows colors look so cool! :-D

Am 01.05.2021 14:12:32 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1769.mcz

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

Name: Morphic-ct.1769
Author: ct
Time: 1 May 2021, 2:12:17.510389 pm
UUID: aa271c07-344a-324a-afe4-3950d6c00839
Ancestors: Morphic-mt.1767

Make SystemWindow's paneColor more robust against missing models. Avoid translucent color.

=============== Diff against Morphic-mt.1767 ===============

Item was changed:
----- Method: SystemWindow>>paneColor (in category 'colors') -----
paneColor
| cc |
(cc := self valueOfProperty: #paneColor) ifNotNil: [^cc].
(model respondsTo: #windowColorToUse) ifTrue: [cc := model windowColorToUse].
+ cc ifNil: [cc := paneMorphs
+ detect: [:morph | morph color isTransparent not]
+ ifFound: [:morph | morph color asNontranslucentColor]
+ ifNone: [nil]].
- cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]].
cc ifNil: [cc := self defaultColor].
self paneColor: cc.
^cc!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1769.mcz

Christoph Thiede

Well, I actually wanted to prevent a window from automatically applying the color of its first child, which is often a transparent panel morph. Recently we had a student complaining that his window was completely lacking color:


ToolBuilder open: (PluggableWindowSpec new
children: {PluggablePanelSpec new
    frame: (LayoutFrame new
topFraction: 1;
    yourself);
yourself};
yourself).



This is because only Model implements #windowColorToUse.
Note that #windowColorToUse, #paneColor, and #defaultColor can still be used to set a translucent color. But I'm not sure whether it is a good idea to derive a transparent color from a child ...

Best,
Christoph

Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 6. Mai 2021 20:32:24
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1769.mcz
 
Avoid translucent color.

Why? I did cut out the drop shadow. Translucent windows colors look so cool! :-D

Am 01.05.2021 14:12:32 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1769.mcz

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

Name: Morphic-ct.1769
Author: ct
Time: 1 May 2021, 2:12:17.510389 pm
UUID: aa271c07-344a-324a-afe4-3950d6c00839
Ancestors: Morphic-mt.1767

Make SystemWindow's paneColor more robust against missing models. Avoid translucent color.

=============== Diff against Morphic-mt.1767 ===============

Item was changed:
----- Method: SystemWindow>>paneColor (in category 'colors') -----
paneColor
| cc |
(cc := self valueOfProperty: #paneColor) ifNotNil: [^cc].
(model respondsTo: #windowColorToUse) ifTrue: [cc := model windowColorToUse].
+ cc ifNil: [cc := paneMorphs
+ detect: [:morph | morph color isTransparent not]
+ ifFound: [:morph | morph color asNontranslucentColor]
+ ifNone: [nil]].
- cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]].
cc ifNil: [cc := self defaultColor].
self paneColor: cc.
^cc!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1769.mcz

marcel.taeumel
Ah. Then #transparent ~= #translucent =)

Best,
Marcel

Am 06.05.2021 23:15:41 schrieb Thiede, Christoph <[hidden email]>:

Well, I actually wanted to prevent a window from automatically applying the color of its first child, which is often a transparent panel morph. Recently we had a student complaining that his window was completely lacking color:


ToolBuilder open: (PluggableWindowSpec new
children: {PluggablePanelSpec new
    frame: (LayoutFrame new
topFraction: 1;
    yourself);
yourself};
yourself).



This is because only Model implements #windowColorToUse.
Note that #windowColorToUse, #paneColor, and #defaultColor can still be used to set a translucent color. But I'm not sure whether it is a good idea to derive a transparent color from a child ...

Best,
Christoph

Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 6. Mai 2021 20:32:24
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1769.mcz
 
Avoid translucent color.

Why? I did cut out the drop shadow. Translucent windows colors look so cool! :-D

Am 01.05.2021 14:12:32 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1769.mcz

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

Name: Morphic-ct.1769
Author: ct
Time: 1 May 2021, 2:12:17.510389 pm
UUID: aa271c07-344a-324a-afe4-3950d6c00839
Ancestors: Morphic-mt.1767

Make SystemWindow's paneColor more robust against missing models. Avoid translucent color.

=============== Diff against Morphic-mt.1767 ===============

Item was changed:
----- Method: SystemWindow>>paneColor (in category 'colors') -----
paneColor
| cc |
(cc := self valueOfProperty: #paneColor) ifNotNil: [^cc].
(model respondsTo: #windowColorToUse) ifTrue: [cc := model windowColorToUse].
+ cc ifNil: [cc := paneMorphs
+ detect: [:morph | morph color isTransparent not]
+ ifFound: [:morph | morph color asNontranslucentColor]
+ ifNone: [nil]].
- cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]].
cc ifNil: [cc := self defaultColor].
self paneColor: cc.
^cc!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1769.mcz

Christoph Thiede

Alright. Are you criticizing my change or only the attached description? :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Freitag, 7. Mai 2021 19:26:32
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1769.mcz
 
Ah. Then #transparent ~= #translucent =)

Best,
Marcel

Am 06.05.2021 23:15:41 schrieb Thiede, Christoph <[hidden email]>:

Well, I actually wanted to prevent a window from automatically applying the color of its first child, which is often a transparent panel morph. Recently we had a student complaining that his window was completely lacking color:


ToolBuilder open: (PluggableWindowSpec new
children: {PluggablePanelSpec new
    frame: (LayoutFrame new
topFraction: 1;
    yourself);
yourself};
yourself).



This is because only Model implements #windowColorToUse.
Note that #windowColorToUse, #paneColor, and #defaultColor can still be used to set a translucent color. But I'm not sure whether it is a good idea to derive a transparent color from a child ...

Best,
Christoph

Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 6. Mai 2021 20:32:24
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1769.mcz
 
Avoid translucent color.

Why? I did cut out the drop shadow. Translucent windows colors look so cool! :-D

Am 01.05.2021 14:12:32 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1769.mcz

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

Name: Morphic-ct.1769
Author: ct
Time: 1 May 2021, 2:12:17.510389 pm
UUID: aa271c07-344a-324a-afe4-3950d6c00839
Ancestors: Morphic-mt.1767

Make SystemWindow's paneColor more robust against missing models. Avoid translucent color.

=============== Diff against Morphic-mt.1767 ===============

Item was changed:
----- Method: SystemWindow>>paneColor (in category 'colors') -----
paneColor
| cc |
(cc := self valueOfProperty: #paneColor) ifNotNil: [^cc].
(model respondsTo: #windowColorToUse) ifTrue: [cc := model windowColorToUse].
+ cc ifNil: [cc := paneMorphs
+ detect: [:morph | morph color isTransparent not]
+ ifFound: [:morph | morph color asNontranslucentColor]
+ ifNone: [nil]].
- cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]].
cc ifNil: [cc := self defaultColor].
self paneColor: cc.
^cc!




Carpe Squeak!