The Trunk: PreferenceBrowser-mt.94.mcz

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

The Trunk: PreferenceBrowser-mt.94.mcz

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

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

Name: PreferenceBrowser-mt.94
Author: mt
Time: 18 September 2019, 10:05:26.464381 am
UUID: 6c61743f-4a13-440b-a6f9-387199e33c2e
Ancestors: PreferenceBrowser-mt.93

Some layout fixes in preference browser.

=============== Diff against PreferenceBrowser-mt.93 ===============

Item was removed:
- ----- Method: PreferenceBrowserMorph>>extent: (in category 'geometry') -----
- extent: aPoint
- super extent: aPoint.
- self fullBounds.
- self adjustPreferenceListItemsWidth.!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>newPreferenceListInnerPanel (in category 'submorphs - preference list') -----
  newPreferenceListInnerPanel
+ | panel |
- | panel maxWidth totalHeight |
  panel := (Morph new)
  color: Color transparent;
  layoutPolicy: TableLayout new;
  listDirection: #topToBottom;
  cellPositioning: #topLeft;
+ hResizing: #spaceFill;
+ vResizing: #shrinkWrap;
  yourself.
  self selectedCategoryPreferences
  do: [:aPref | panel addMorphBack: (self newPreferenceButtonFor: aPref)].
- panel submorphs size = 0 ifTrue: [^panel].
- maxWidth := (panel submorphs detectMax: [:m | m width]) width.
- panel width: maxWidth.
- totalHeight := (panel submorphs collect: [:ea | ea height]) inject: 0
- into: [:h :tot | h + tot].
- panel height: totalHeight.
- panel fullBounds.
  ^panel!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>preferenceList (in category 'submorphs - preference list') -----
  preferenceList
  ^preferenceList ifNil:
  [preferenceList := ScrollPane new
  vResizing: #spaceFill;
  hResizing: #spaceFill;
  layoutFrame: (LayoutFrame fractions: (0.25@0 corner: 1@1) offsets: (4@0 corner: 0@0)).
  preferenceList scroller
+ on: #keyStroke send: #keyPressed: to: self;
+ changeTableLayout.
- on: #keyStroke send: #keyPressed: to: self.
  preferenceList.]!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>updateSelectedCategoryPreferences (in category 'updating') -----
  updateSelectedCategoryPreferences
  Cursor wait showWhile:
  [self preferenceList
  hScrollBarValue: 0;
  vScrollBarValue: 0.
  self preferenceList scroller removeAllMorphs.
  self preferenceList scroller addMorphBack: self newPreferenceListInnerPanel.
- self adjustPreferenceListItemsWidth.
  self adoptPaneColor: self paneColor]!