The Trunk: Morphic-mt.940.mcz

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

The Trunk: Morphic-mt.940.mcz

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

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

Name: Morphic-mt.940
Author: mt
Time: 27 April 2015, 4:10:31.22 pm
UUID: 80ffece0-d3f7-1648-93a0-af606bc08d48
Ancestors: Morphic-mt.939

Fixed button height in font chooser tool.

=============== Diff against Morphic-mt.939 ===============

Item was changed:
  ----- Method: FontChooserTool>>buildButtonBarWith: (in category 'toolbuilder') -----
  buildButtonBarWith: builder
  "Build the button bar"
  | panelSpec buttonSpec |
  panelSpec := builder pluggablePanelSpec new.
+ panelSpec
+ layout: #horizontal;
+ children: OrderedCollection new.
- panelSpec children: OrderedCollection new.
 
  buttonSpec := builder pluggableButtonSpec new.
  buttonSpec
  model: self;
+ label: 'Apply' translated;
+ action: #apply.
- label: ' Apply ' translated;
- action: #apply;
- frame: (0.0@0 corner: 0.33@1).
  panelSpec children addLast: buttonSpec.
 
 
  buttonSpec := builder pluggableButtonSpec new.
  buttonSpec
  model: self;
+ label: 'OK' translated;
+ action: #accept.
- label: '     OK     ' translated;
- action: #accept;
- frame: (0.33@0 corner: 0.67@1).
  panelSpec children addLast: buttonSpec.
 
  buttonSpec := builder pluggableButtonSpec new.
  buttonSpec
  model: self;
+ label: 'Cancel' translated;
+ action: #cancel.
- label: ' Cancel ' translated;
- action: #cancel;
- frame: (0.67@0 corner: 1@1).
  panelSpec children addLast: buttonSpec.
 
  ^panelSpec!

Item was changed:
  ----- Method: FontChooserTool>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  "Create the ui for the browser"
  "ToolBuilder open: self"
  | windowSpec |
  self offerStyleList ifTrue:[
  windowSpec := self buildWindowWith: builder specs: {
  (0@0 corner: 0.4@0.4) -> [self buildFontListWith: builder].
  (0.4@0 corner: 0.8@0.4) -> [self buildStyleListWith: builder].
  (0.8@0 corner: 1.0@0.4) -> [self buildPointSizeListWith: builder].
+ (LayoutFrame fractions: (0.0@0.4 corner: 1.0@1.0) offsets: (0@0 corner: 0 @ self buttonHeight negated)) -> [self buildPreviewPaneWith: builder].
+ (LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@ self buttonHeight negated corner: 0@0)) -> [self buildButtonBarWith: builder].
- (0.0@0.4 corner: 1.0@0.88) -> [self buildPreviewPaneWith: builder].
- (0.0@0.88 corner: 1@1) -> [self buildButtonBarWith: builder].
  }.
  ] ifFalse:[
  windowSpec := self buildWindowWith: builder specs: {
  (0@0 corner: 0.7@0.4) -> [self buildFontListWith: builder].
  " (0.4@0 corner: 0.8@0.4) -> [self buildStyleListWith: builder]."
  (0.7@0 corner: 1.0@0.4) -> [self buildPointSizeListWith: builder].
+ (LayoutFrame fractions: (0.0@0.4 corner: 1.0@1.0) offsets: (0@0 corner: 0 @ self buttonHeight negated)) -> [self buildPreviewPaneWith: builder].
+ (LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@ self buttonHeight negated corner: 0@0)) -> [self buildButtonBarWith: builder].
- (0.0@0.4 corner: 1.0@0.8) -> [self buildPreviewPaneWith: builder].
- (0.0@0.8 corner: 1@1) -> [self buildButtonBarWith: builder].
  }.
  ].
  windowSpec extent: self initialExtent.
  window := builder build: windowSpec.
 
  "Now that the window has been built, notify selection again to scroll it into view."
  self changed: #selectedFontIndex.
  ^window!

Item was added:
+ ----- Method: FontChooserTool>>buttonHeight (in category 'toolbuilder') -----
+ buttonHeight
+ ^ Preferences standardButtonFont height * 3!