The Trunk: Tools-mt.593.mcz

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

The Trunk: Tools-mt.593.mcz

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

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

Name: Tools-mt.593
Author: mt
Time: 16 April 2015, 9:02:25.959 am
UUID: e6e004e2-f8a4-894e-a71c-eb0fa08df3e8
Ancestors: Tools-topa.592

Optimized default proportions in explorer and inspector to avoid visual glitches for

- thick scrollbars
- menu button visible
- arrow buttons visible

Note: This problem is related to the minimal extents of widgets in general.

=============== Diff against Tools-topa.592 ===============

Item was changed:
  ----- Method: Inspector>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  "Inspector openOn: SystemOrganization"
  | windowSpec specs buttonOffset wantsExploreButton |
  wantsExploreButton := Smalltalk isMorphic.
  buttonOffset := (Preferences standardButtonFont widthOfString: 'explore') * 3/2.
 
  self flag: #mvc. "mt: We can remove this if we can build trees in MVC and thus have a working object explorer there."
  specs := {
+ (0@0 corner: 0.3@0.71)  -> [self buildFieldListWith: builder].
+ (0.3@0.0corner: 1@0.71) -> [self buildValuePaneWith: builder]},
- (0@0 corner: 0.3@0.75)  -> [self buildFieldListWith: builder].
- (0.3@0.0corner: 1@0.75) -> [self buildValuePaneWith: builder]},
  (wantsExploreButton
  ifTrue: [{
+ (LayoutFrame fractions: (0@0.71 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
+ (LayoutFrame fractions: (1@0.71 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].}]
+ ifFalse: [{(0.0@0.71 corner: 1@1) -> [self buildCodePaneWith: builder]}]).
- (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
- (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].}]
- ifFalse: [{(0.0@0.7corner: 1@1) -> [self buildCodePaneWith: builder]}]).
 
  windowSpec := self buildWindowWith: builder specs: specs.
  windowSpec extent: self initialExtent.
  ^builder build: windowSpec!

Item was changed:
  ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
 
  | windowSpec treeSpec textSpec buttonSpec buttonOffset |
  windowSpec := builder pluggableWindowSpec new.
  windowSpec
  model: self;
  children: OrderedCollection new;
  label: #label;
  extent: self initialExtent.
 
  treeSpec := builder pluggableTreeSpec new.
  treeSpec
  model: self;
  nodeClass: self class nodeClass;
  roots: #getList;
  keyPress: #explorerKey:from:event:;
  getSelected: #currentSelection;
  setSelected: #currentSelection:;
  setSelectedParent: #currentParent:;
  menu: #genericMenu:;
  autoDeselect: false;
  columns: (ObjectExplorerWrapper showContentsInColumns
  ifTrue: [{
  [:listMorph | (listMorph filteredItems collect: [:item |
  item preferredWidthOfColumn: 1]) max].
  nil "take all the space"}]);
+ frame: (0@0 corner: 1@0.71).
- frame: (0@0 corner: 1@0.75).
  windowSpec children add: treeSpec.
 
  buttonOffset := (Preferences standardButtonFont widthOfString: 'inspect') * 3/2.
 
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self;
  getText: #expression;
  editText: #expression:;
  menu: #codePaneMenu:shifted:;
  help: 'Evaluate expressions for the current tree selection...' translated;
+ frame: (LayoutFrame fractions: (0@0.71 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)).
- frame: (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)).
  windowSpec children add: textSpec.
 
  buttonSpec := builder pluggableButtonSpec new
  model: self;
  label: 'inspect';
  action: #inspectObject;
  help: 'Switch to an inspector tool';
+ frame: (LayoutFrame fractions: (1@0.71 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)).
- frame: (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)).
  windowSpec children add: buttonSpec.
 
  [^ builder build: windowSpec]
  ensure: [self changed: #expandRootsRequested]!