patchworkUIThemeColorFor: aWindowOrModel
    "Answer the colour for the given window."
    ^ aWindowOrModel ifNotNil: [
        (aWindowOrModel respondsTo: #patchworkUIThemeColor)
        ifTrue: [aWindowOrModel patchworkUIThemeColor]
ifFalse: [(aWindowOrModel class respondsTo: #patchworkUIThemeColor)
            ifTrue: [aWindowOrModel class patchworkUIThemeColor]
            ifFalse: [self settings windowColor]]]


windowColorFor: aWindowOrModel
    "Answer the colour for the given window."
    | c |
    ^ self settings standardColorsOnly
        ifTrue: [self settings windowColor]
        ifFalse: [c := aWindowOrModel isMorphicModel
ifTrue: [self patchworkUIThemeColorFor: aWindowOrModel model].
            c
                ifNil: [(self patchworkUIThemeColorFor: aWindowOrModel)
                        ifNil: [self settings windowColor]]]

Reply via email to