Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.129.mcz ==================== Summary ==================== Name: EToys-mt.129 Author: mt Time: 28 August 2015, 10:38:10.951 am UUID: 67137285-c25a-4646-949c-ee0e7cdd37a2 Ancestors: EToys-mt.128 Removes color preference views (to regular PreferenceBrowser package). =============== Diff against EToys-mt.128 =============== Item was changed: SystemOrganization addCategory: #'Etoys-Buttons'! SystemOrganization addCategory: #'Etoys-CustomEvents'! SystemOrganization addCategory: #'Etoys-Experimental'! SystemOrganization addCategory: #'Etoys-Outliner'! - SystemOrganization addCategory: #'Etoys-PreferenceBrowser'! SystemOrganization addCategory: #'Etoys-Protocols'! SystemOrganization addCategory: #'Etoys-Protocols-Type Vocabularies'! SystemOrganization addCategory: #'Etoys-Scripting'! SystemOrganization addCategory: #'Etoys-Scripting Support'! SystemOrganization addCategory: #'Etoys-Scripting Tiles'! SystemOrganization addCategory: #'Etoys-Stacks'! SystemOrganization addCategory: #'Etoys-StarSqueak'! SystemOrganization addCategory: #'Etoys-Support'! SystemOrganization addCategory: #'Etoys-Tests'! SystemOrganization addCategory: #'Etoys-Tile Scriptors'! SystemOrganization addCategory: #'Etoys-Widgets'! Item was removed: - PBPreferenceView subclass: #PBColorPreferenceView - instanceVariableNames: 'button' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-PreferenceBrowser'! Item was removed: - ----- Method: PBColorPreferenceView class>>initialize (in category 'class initialization') ----- - initialize - PreferenceViewRegistry ofColorPreferences register: self.! Item was removed: - ----- Method: PBColorPreferenceView class>>unload (in category 'class initialization') ----- - unload - "Unload order is not guaranteed so guard against failure" - [PreferenceViewRegistry ofColorPreferences unregister: self] on: Error do:[]! Item was removed: - ----- Method: PBColorPreferenceView>>adjustLabelColor (in category 'user interface') ----- - adjustLabelColor - | textColor | - (self preference preferenceValue luminance < 0.5) - ifTrue:[ textColor := Color white] - ifFalse:[ textColor := Color black]. - button allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [ m color: textColor]]. ! Item was removed: - ----- Method: PBColorPreferenceView>>borderStyleMenu (in category 'user interface') ----- - borderStyleMenu - "Add border-style menu items" - - | aMenu | - aMenu := MenuMorph new defaultTarget: self. - - aMenu addStayUpItemSpecial. - aMenu add: 'border color...' translated target: self selector:#changeColor: argument: button. - aMenu addLine. - BorderStyle borderStyleChoices do: - [:sym | (aMenu borderStyleForSymbol: sym) - ifNotNil: - [aMenu add: sym translated target: self selector: #setBorderStyle: argument: sym]]. - ^aMenu openNear: ActiveHand bounds. - ! Item was removed: - ----- Method: PBColorPreferenceView>>changeColor: (in category 'user interface') ----- - changeColor: aButton - aButton changeColor. - self preference preferenceValue: aButton fillStyle. - button label: self preference preferenceValue asString. - self adjustLabelColor ! Item was removed: - ----- Method: PBColorPreferenceView>>colorMenuButton (in category 'user interface') ----- - colorMenuButton - | selector name | - name := self preference name. - (name includesSubstring: 'border' caseSensitive: false) - ifTrue: [ selector := #borderStyleMenu] - ifFalse:[ selector := #fillStyleMenu]. - button := SimpleButtonMorph new - label: self preference preferenceValue asString; - actionSelector: selector; - target: self. - name = #menuBorderColor - ifTrue:[ ^button borderColor: MenuMorph menuBorderColor; borderWidth: MenuMorph menuBorderWidth]. - name = #menuTitleBorderColor - ifTrue:[ ^button borderColor: MenuMorph menuTitleBorderColor; borderWidth: MenuMorph menuTitleBorderWidth]. - self adjustLabelColor. - ^button color: self preference preferenceValue - - - "UpdatingRectangleMorph new - target: self preference; - getSelector: #preferenceValue; - putSelector: #preferenceValue:; - extent: 22@22; - setBalloonText: 'click here to change the color' translated; - yourself."! Item was removed: - ----- Method: PBColorPreferenceView>>colorSwatch (in category 'user interface') ----- - colorSwatch - ^UpdatingRectangleMorph new - target: self preference; - getSelector: #preferenceValue; - putSelector: #preferenceValue:; - extent: 22@22; - setBalloonText: 'click here to change the color' translated; - yourself.! Item was removed: - ----- Method: PBColorPreferenceView>>fillStyleMenu (in category 'user interface') ----- - fillStyleMenu - "Add the items for changing the current fill style of the Morph" - | aMenu | - "self canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor]." - aMenu := MenuMorph new defaultTarget: self. - "self preference preferenceValue addFillStyleMenuItems: aMenu hand: nil from: self." - aMenu add: 'change color...' translated target: self selector:#changeColor: argument: button. - aMenu addLine. - aMenu add: 'solid fill' translated action: #useSolidFill. - "aMenu add: 'gradient fill' translated action: #useGradientFill. - aMenu add: 'bitmap fill' translated action: #useBitmapFill. - aMenu add: 'default fill' translated action: #useDefaultFill." - ^aMenu openNear: ActiveHand bounds. - ! Item was removed: - ----- Method: PBColorPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- - representativeButtonWithColor: aColor inPanel: aPreferenceBrowser - ^self horizontalPanel - layoutInset: 2; - color: aColor; - cellInset: 20; - cellPositioning: #center; - addMorphBack: (StringMorph contents: self preference name); - addMorphBack: self horizontalFiller; - addMorphBack: self colorMenuButton; - yourself! Item was removed: - ----- Method: PBColorPreferenceView>>setBorderStyle: (in category 'user interface') ----- - setBorderStyle: aBorderStyle - self preference name = #menuBorderColor - ifTrue: [button color: MenuMorph menuColor; - borderWidth: MenuMorph menuBorderWidth]. - self preference name = #menuTitleBorderColor - ifTrue: [button color: MenuMorph menuTitleColor; - borderWidth: MenuMorph menuTitleBorderWidth]. - self preference preferenceValue: aBorderStyle. - button label: self preference preferenceValue asString; - borderColor: aBorderStyle. - ! Item was removed: - ----- Method: PBColorPreferenceView>>useGradientFill (in category 'user interface') ----- - useGradientFill - - "Make receiver use a solid fill style (e.g., a simple color)" - - - | color1 color2 fill | - self preference preferenceValue isGradientFill ifTrue:[^self]. "Already done" - color1 := Color white darker. - color2 := self preference preferenceValue asColor. - fill := GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}. - fill origin: ActiveWorld topLeft. - fill direction: 0 @ ActiveWorld bounds extent y. - fill normal: ActiveWorld bounds extent x @ 0. - fill radial: false. - self preference preferenceValue: fill. - button label: self preference preferenceValue asString; - color: self preference preferenceValue! Item was removed: - ----- Method: PBColorPreferenceView>>useSolidFill (in category 'user interface') ----- - useSolidFill - "Make receiver use a solid fill style (e.g., a simple color)" - self preference preferenceValue isSolidFill ifTrue:[^self]. "Already done" - self preference preferenceValue: self preference preferenceValue asColor. "Try minimizing changes" - - button label: self preference preferenceValue asString; - color: self preference preferenceValue - ! Item was removed: - PBColorPreferenceView subclass: #PBWindowColorPreferenceView - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-PreferenceBrowser'! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>initialize (in category 'class initialization') ----- - initialize - self viewRegistry register: self.! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>unload (in category 'class initialization') ----- - unload - "Unload order is not guaranteed so guard against failure" - [self viewRegistry unregister: self] on: Error do:[]! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>viewRegistry (in category 'class initialization') ----- - viewRegistry - ^(PreferenceViewRegistry registryOf: #windowColorPreferences) - viewOrder: 6; - yourself.! Item was removed: - ----- Method: PBWindowColorPreferenceView>>initialize (in category 'initialization') ----- - initialize - super initialize. - self addActionTitled: 'Bright' target: Preferences selector: #installBrightWindowColors arguments: {} balloonText: 'Use standard bright colors for all windows' translated. - self addActionTitled: 'Pastel' target: Preferences selector: #installPastelWindowColors arguments: {} balloonText: 'Use standard pastel colors for all windows' translated. - self addActionTitled: 'Gray' target: Preferences selector: #installUniformWindowColors arguments: {} balloonText: 'Use gray backgrounds for all standard windows' translated.! |
Free forum by Nabble | Edit this page |