Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1225.mcz ==================== Summary ==================== Name: Morphic-mt.1225 Author: mt Time: 3 August 2016, 10:07:05.19227 am UUID: 997b3ea0-bf32-9140-a6df-5147d1c278f9 Ancestors: Morphic-mt.1224 Fixes scratch-pad to be compatible with UI themes. This is not the optimal solution but it works for now. =============== Diff against Morphic-mt.1224 =============== Item was changed: ----- Method: BalloonMorph class>>balloonColor (in category 'preferences') ----- balloonColor + self flag: #remove. "mt: We should remove this additional getter in the future and use UI themes instead:" + ^ (UserInterfaceTheme current get: #color for: #NewBalloonMorph) ifNil: [(TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.749)]! - <preference: 'Balloon background color' - categoryList: #(Morphic colors) - description: 'Specifies the background of balloon tips.' - type: #Color> - - ^ BalloonColor ifNil: [(TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.749)]! Item was changed: ----- Method: BalloonMorph class>>balloonColor: (in category 'preferences') ----- balloonColor: aColor + self flag: #remove. "mt: We should remove this additional setter in the future and use UI themes instead:" + UserInterfaceTheme current set: #color for: #NewBalloonMorph to: aColor.! - BalloonColor := aColor.! Item was changed: ----- Method: BalloonMorph class>>balloonFont (in category 'utility') ----- balloonFont + + self flag: #remove. "mt: We should remove this additional getter in the future and use UI themes instead:" + ^ (UserInterfaceTheme current get: #font for: #NewBalloonMorph) ifNil: [TextStyle defaultFont]! - ^ BalloonFont! Item was changed: ----- Method: BalloonMorph class>>setBalloonFontTo: (in category 'utility') ----- setBalloonFontTo: aFont + + self flag: #remove. "mt: We should remove this additional setter in the future and use UI themes instead:" + UserInterfaceTheme current set: #font for: #NewBalloonMorph to: aFont.! - aFont ifNotNil: [BalloonFont := aFont]! Item was changed: ----- Method: PluggableTextMorph>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters super setDefaultParameters. self font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]); setTextColor: (self userInterfaceTheme textColor ifNil: [Color black]). self wrapBorderColor: ((self userInterfaceTheme wrapBorderColorModifier ifNil: [ [:c | c muchLighter alpha: 0.3] ]) value: self borderColor). self setProperty: #adornmentReadOnly toValue: (self userInterfaceTheme adornmentReadOnly ifNil: [Color black]); setProperty: #adornmentRefuse toValue: (self userInterfaceTheme adornmentRefuse ifNil: [Color tan]); setProperty: #adornmentConflict toValue: (self userInterfaceTheme adornmentConflict ifNil: [Color red]); setProperty: #adornmentDiff toValue: (self userInterfaceTheme adornmentDiff ifNil: [Color green]); setProperty: #adornmentNormalEdit toValue: (self userInterfaceTheme adornmentNormalEdit ifNil: [Color orange]); setProperty: #adornmentDiffEdit toValue: (self userInterfaceTheme adornmentDiffEdit ifNil: [Color yellow]). textMorph + caretColor: (self userInterfaceTheme caretColor ifNil: [Color red]); + selectionColor: (self userInterfaceTheme selectionColor ifNil: [TranslucentColor r: 0.0 g: 0.0 b: 0.8 alpha: 0.2]); + unfocusedSelectionColor: ((self userInterfaceTheme unfocusedSelectionModifier ifNil: [ [:c | Color gray: 0.9] ]) - setProperty: #caretColor - toValue: (self userInterfaceTheme caretColor ifNil: [Color red]); - setProperty: #selectionColor - toValue: (self userInterfaceTheme selectionColor ifNil: [TranslucentColor r: 0.0 g: 0.0 b: 0.8 alpha: 0.2]); - setProperty: #unfocusedSelectionColor - toValue: ((self userInterfaceTheme unfocusedSelectionModifier ifNil: [ [:c | Color gray: 0.9] ]) value: textMorph selectionColor).! Item was changed: ----- Method: SearchBar>>scratchPad (in category 'accessing') ----- scratchPad ^ scratchPad ifNil: + [ scratchPad := TextMorphForEditView new. "we should be able to use TextMorph here; fix later" - [ scratchPad := TextMorph new. scratchPad " on: #keyboardFocusChange send: #removeScratchPad to: self ;" on: #mouseLeave send: #removeScratchPad to: self ; on: #keyStroke send: #handleScratchPadKey: to: self ; + margins: (5@0 corner: 5@0); backgroundColor: (BalloonMorph balloonColor alpha: 1.0) ; + setEditView: PluggableTextMorph new ; "dummy" autoFit: true ; wrapFlag: true ; newContents: '--scratch area--' ; + font: ((UserInterfaceTheme current get: #font for: #PluggableTextMorph) ifNil: [TextStyle defaultFont]); + textColor: ((UserInterfaceTheme current get: #textColor for: #PluggableTextMorph) ifNil: [Color black]); + caretColor: ((UserInterfaceTheme current get: #caretColor for: #PluggableTextMorph) ifNil: [Color red]); + selectionColor: ((UserInterfaceTheme current get: #selectionColor for: #PluggableTextMorph) ifNil: [Color blue]) muchDarker; yourself. self layoutScratchPad. Preferences menuAppearance3d ifTrue: [ scratchPad addDropShadow ]. scratchPad ]! Item was added: + ----- Method: TextMorphForEditView>>caretColor: (in category 'accessing') ----- + caretColor: aColor + self + setProperty: #caretColor + toValue: aColor.! Item was added: + ----- Method: TextMorphForEditView>>selectionColor: (in category 'accessing') ----- + selectionColor: aColor + + self + setProperty: #selectionColor + toValue: aColor.! Item was added: + ----- Method: TextMorphForEditView>>unfocusedSelectionColor: (in category 'accessing') ----- + unfocusedSelectionColor: aColor + + self + setProperty: #unfocusedSelectionColor + toValue: aColor.! |
Free forum by Nabble | Edit this page |