The Trunk: ST80-mt.218.mcz

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

The Trunk: ST80-mt.218.mcz

commits-2
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.218.mcz

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

Name: ST80-mt.218
Author: mt
Time: 24 August 2016, 1:45:33.502718 pm
UUID: 847f8a18-1aca-8940-871d-6d83553b92f7
Ancestors: ST80-mt.217

Simple MVC update to use UI theme colors for buttons, text fields, lists, and windows.

=============== Diff against ST80-mt.217 ===============

Item was changed:
  ----- Method: PluggableButtonView>>label: (in category 'accessing') -----
  label: aStringOrDisplayObject
  "Label this button with the given String or DisplayObject."
 
+ | fontToUse |
+ fontToUse := self userInterfaceTheme font ifNil: [TextStyle defaultFont].
  ((aStringOrDisplayObject isKindOf: Paragraph)
  or: [aStringOrDisplayObject isForm])
  ifTrue: [label := aStringOrDisplayObject]
+ ifFalse: [label := (Paragraph withText: (aStringOrDisplayObject asText
+ addAttribute: (TextFontReference toFont: fontToUse)))].
- ifFalse: [label := aStringOrDisplayObject asParagraph].
  self centerLabel.
  !

Item was added:
+ ----- Method: StandardSystemView>>defaultBackgroundColor (in category 'initialize-release') -----
+ defaultBackgroundColor
+
+ ^ model
+ ifNil: [Color white]
+ ifNotNil: [:m | m windowColorToUse]!

Item was added:
+ ----- Method: StandardSystemView>>defaultForegroundColor (in category 'initialize-release') -----
+ defaultForegroundColor
+
+ ^ (self userInterfaceTheme borderColorModifier ifNil: [ [:c | c adjustBrightness: -0.5] ]) value: self defaultBackgroundColor!

Item was removed:
- ----- Method: StandardSystemView>>model: (in category 'initialize-release') -----
- model: aModel
- "Set the receiver's model.  For a Standard System View, we also at this time get the default background color set up.  7/30/96 sw"
- super model: aModel.
- self setDefaultBackgroundColor!

Item was added:
+ ----- Method: View>>defaultBackgroundColor (in category 'initialize-release') -----
+ defaultBackgroundColor
+
+ ^ self userInterfaceTheme color!

Item was added:
+ ----- Method: View>>defaultForegroundColor (in category 'initialize-release') -----
+ defaultForegroundColor
+
+ ^ self userInterfaceTheme borderColor!

Item was changed:
  ----- Method: View>>model:controller: (in category 'controller access') -----
  model: aModel controller: aController
  "Set the receiver's model to aModel, add the receiver to aModel's list of
  dependents, and set the receiver's controller to aController. Subsequent
  changes to aModel (see Model|change) will result in View|update:
  messages being sent to the receiver. #NoControllerAllowed for the value
  of aController indicates that no default controller is available; nil for the
  value of aController indicates that the default controller is to be used
  when needed. If aController is neither #NoControllerAllowed nor nil, its
  view is set to the receiver and its model is set to aModel."
 
  model ~~ nil & (model ~~ aModel)
  ifTrue: [model removeDependent: self].
  aModel ~~ nil & (aModel ~~ model)
  ifTrue: [aModel addDependent: self].
  model := aModel.
  aController ~~ nil
  ifTrue:
  [aController view: self.
  aController model: aModel].
+ controller := aController.
+
+ self setDefaultForegroundColor.
+ self setDefaultBackgroundColor.!
- controller := aController!

Item was changed:
  ----- Method: View>>setDefaultBackgroundColor (in category 'initialize-release') -----
  setDefaultBackgroundColor
  "Obtain the background color from the receiver's model.
  The preferences make sure whether this is a colorful or uniform
  look."
 
+ self backgroundColor: self defaultBackgroundColor!
- self backgroundColor: model windowColorToUse!

Item was added:
+ ----- Method: View>>setDefaultForegroundColor (in category 'initialize-release') -----
+ setDefaultForegroundColor
+
+ self foregroundColor: self defaultForegroundColor!