The Trunk: PreferenceBrowser-mt.91.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.91.mcz

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

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

Name: PreferenceBrowser-mt.91
Author: mt
Time: 22 August 2019, 3:24:55.497931 pm
UUID: 81841a24-8d1b-0540-9c59-086f362cc717
Ancestors: PreferenceBrowser-mt.90

Complements Morphic-mt.1506 including cellInset-to-cellGap conversion.

=============== Diff against PreferenceBrowser-mt.90 ===============

Item was changed:
  ----- Method: PBBooleanPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') -----
  representativeButtonWithColor: aColor inPanel: aPreferencesPanel
  ^self horizontalPanel
  layoutInset: 2;
+ cellGap: 7;
- cellInset: 7;
  color: aColor;
  addMorphBack: self morphForName;
  addMorphBack: self horizontalFiller;
  addMorphBack: self enabledButton;
  addMorphBack: self localToProjectButton;
  yourself.!

Item was changed:
  ----- Method: PBColorPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') -----
  representativeButtonWithColor: aColor inPanel: aPreferenceBrowser
  ^self horizontalPanel
  layoutInset: 2;
  color: aColor;
+ cellGap: 20;
- cellInset: 20;
  cellPositioning: #center;
  addMorphBack: self morphForName;
  addMorphBack: self horizontalFiller;
  addMorphBack: self colorMenuButton;
  yourself!

Item was changed:
  ----- Method: PBNumericPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') -----
  representativeButtonWithColor: aColor inPanel: aPreferenceBrowser
  ^self horizontalPanel
  layoutInset: 2;
  color: aColor;
+ cellGap: 20;
- cellInset: 20;
  cellPositioning: #center;
  addMorphBack: self morphForName;
  addMorphBack: self horizontalFiller;
  addMorphBack: self textField;
  yourself.!

Item was changed:
  ----- Method: PBPreferenceButtonMorph>>addExtraControls (in category 'extra controls') -----
  addExtraControls
  | m |
  m := self horizontalPanel
+ cellGap: 3;
- cellInset: 3;
  addAllMorphs: self actionButtons;
  addMorphBack: self horizontalFiller;
  addMorphBack: self moreButton;
  yourself.
  self
  addMorphBack: (self blankSpaceOf: 2@2);
  addMorphBack: self preferenceHelpTextMorph;
  addMorphBack: self horizontalLine;
  addMorphBack: self preferenceCodeTextMorph;
  fullBounds; "to force a layout compute needed by the textMorphs's autoFit"
  addMorphBack: m
  !

Item was changed:
  ----- Method: PBPreferenceButtonMorph>>basicPanel (in category 'utility methods') -----
  basicPanel
  ^BorderedMorph new
  beTransparent;
  extent: 0@0;
  borderWidth: 0;
  layoutInset: 0;
+ cellGap: 0;
- cellInset: 0;
  layoutPolicy: TableLayout new;
  listCentering: #topLeft;
  cellPositioning: #center;
  hResizing: #spaceFill;
  vResizing: #shrinkWrap;
  yourself!

Item was changed:
  ----- Method: PBPreferenceButtonMorph>>initializeLayout (in category 'initialization') -----
  initializeLayout
  self layoutPolicy: TableLayout new;
  beTransparent;
  layoutInset: 0;
+ cellGap: 0;
- cellInset: 0;
  listCentering: #topLeft;
  cellPositioning: #topLeft;
  listDirection: #topToBottom;
  hResizing: #spaceFill;
  vResizing: #shrinkWrap. !

Item was changed:
  ----- Method: PBPreferenceView>>basicPanel (in category 'user interface') -----
  basicPanel
  ^BorderedMorph new
  beTransparent;
  extent: 0@0;
  borderWidth: 0;
  layoutInset: 0;
+ cellGap: 5;
- cellInset: 5;
  layoutPolicy: TableLayout new;
  listCentering: #topLeft;
  cellPositioning: #center;
  hResizing: #shrinkWrap;
  vResizing: #shrinkWrap;
  yourself!

Item was changed:
  ----- Method: PBTextPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') -----
  representativeButtonWithColor: aColor inPanel: aPreferenceBrowser
  ^self horizontalPanel
  layoutInset: 2;
  color: aColor;
+ cellGap: 20;
- cellInset: 20;
  cellPositioning: #center;
  addMorphBack: self morphForName;
  addMorphBack: self textField;
  yourself.!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>mainPanel (in category 'submorphs - main panel') -----
  mainPanel
  ^mainPanel ifNil:
  [mainPanel := BorderedMorph new
  color: Color transparent;
  borderWidth: 0;
  hResizing: #spaceFill;
  vResizing: #spaceFill;
+ cellGap: 5;
- cellInset: 5;
  changeProportionalLayout;
  on: #mouseEnter send: #paneTransition: to: self;
  addMorphBack: self newCategoryList;
  addMorphBack: self preferenceList;
  layoutFrame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@ 30 corner: 0@0));
  addPaneSplitters;
  yourself].!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>newButtonRow (in category 'submorphs - buttons') -----
  newButtonRow
  ^BorderedMorph new
  color: Color transparent;
  borderWidth: 0;
+ cellGap: 2;
- cellInset: 2;
  layoutInset: 2;
  layoutPolicy: TableLayout new;
  listDirection: #leftToRight;
  listCentering: #topLeft;
  cellPositioning: #topLeft;
  on: #mouseEnter send: #paneTransition: to: self;
  on: #mouseLeave send: #paneTransition: to: self;
  addMorphBack: self defaultButton;
  addMorphBack: self newSeparator;
  addMorphBack: self saveButton;
  addMorphBack: self loadButton;
  addMorphBack: self newSeparator;
  addMorphBack: self saveToDiskButton;
  addMorphBack: self loadFromDiskButton;
  addMorphBack: self newSeparator;
  addMorphBack: self themeButton;
  addMorphBack: self newTransparentFiller;
  addMorphBack: self helpButton;
  yourself.!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>newCategoryListPanel (in category 'submorphs - category list') -----
  newCategoryListPanel
  ^Morph new
  hResizing: #shrinkWrap;
  vResizing: #spaceFill;
  color: Color transparent;
  layoutPolicy: TableLayout new;
+ cellGap: 3;
- cellInset: 3;
  listCentering: #topLeft;
  listDirection: #topToBottom;
  cellPositioning: #topLeft;
  clipSubmorphs: true;
  addMorphBack: self newCategoryListPanelLabel;
  addMorphBack: self newCategoryList!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>newPreferenceListPanel (in category 'submorphs - preference list') -----
  newPreferenceListPanel
  | panel |
  panel := Morph new
  hResizing: #spaceFill;
  vResizing: #spaceFill;
  color: Color transparent;
  layoutPolicy: TableLayout new;
+ cellGap: 3;
- cellInset: 3;
  listCentering: #topLeft;
  listDirection: #topToBottom;
  cellPositioning: #topLeft;
  clipSubmorphs: true;
  addMorphBack: self newPreferenceListPanelLabel;
  addMorphBack: self preferenceList.
  ^panel.!

Item was changed:
  ----- Method: PreferenceBrowserMorph>>newSearchPanel (in category 'submorphs - search panel') -----
  newSearchPanel
  | bottom |
  bottom := Morph new
  color: Color transparent;
+ cellGap: 5;
- cellInset: 5;
  layoutPolicy: TableLayout new;
  listDirection: #leftToRight;
  listCentering: #topLeft;
  cellPositioning: #topLeft;
  hResizing: #spaceFill;
  vResizing: #shrinkWrap;
  addMorphBack: self newSearchTextField
  yourself.
  ^Morph new
  color: Color transparent;
  layoutPolicy: TableLayout new;
  listDirection: #topToBottom;
  listCentering: #topLeft;
  cellPositioning: #topLeft;
  hResizing: #spaceFill;
  vResizing: #shrinkWrap;
+ cellGap: 3;
- cellInset: 3;
  addMorphBack: (StringMorph contents: 'Search preferences for: ');
  addMorphBack: bottom;
  yourself.!

Item was changed:
  ----- Method: PreferenceWizardMorph>>createCheckbox:for:help: (in category 'initialization') -----
  createCheckbox: label for: selector help: terms
 
  | box lbl btn |
 
  btn := self createButton
  layoutInset: 0;
  label: ' ';
  onColor: (self defaultColor adjustBrightness: 0.3) offColor: (self defaultColor adjustBrightness: 0.3);
  vResizing: #rigid;
  hResizing: #rigid;
  action: ('toggle', selector) asSymbol;
  getStateSelector: ('state', selector) asSymbol;
  getLabelSelector: ('label', selector) asSymbol;
  extent: 25@25.
 
  lbl := self createLabel: label color: self defaultTextColor.
 
  box := Morph new
  color: Color transparent;
  changeTableLayout;
  listDirection: #leftToRight;
  cellPositioning: #topLeft;
  hResizing: #spaceFill;
  vResizing: #shrinkWrap;
+ cellGap: 10;
- cellInset: 10;
  yourself.
 
  box addAllMorphs: {btn. lbl}.
  self
  setBalloonText: (terms isString ifTrue: [terms] ifFalse: [self findHelpStringFor: terms])
  for: box.
  ^ box!

Item was changed:
  ----- Method: PreferenceWizardMorph>>createPage (in category 'initialization') -----
  createPage
 
  ^ Morph new
  color: Color transparent;
  hResizing: #spaceFill;
  vResizing: #spaceFill;
  changeTableLayout;
  listDirection: #topToBottom;
  cellPositioning: #topLeft;
  layoutInset: 20;
+ cellGap: 10;
- cellInset: 10;
  yourself!

Item was changed:
  ----- Method: PreferenceWizardMorph>>initialize (in category 'initialization') -----
  initialize
 
  super initialize.
 
  isFullScreen := false.
 
  self hasLowPerformance
  ifTrue: [self color: self defaultColor]
  ifFalse: [self color: (self defaultColor alpha: 0.75)].
 
  self setProperty: #indicateKeyboardFocus toValue: #never.
 
  Preferences enable: #systemWindowEmbedOK.
 
  titleMorph := ('Welcome to Squeak' translated asText
  addAttribute: (TextColor color: self defaultTextColor);
  addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20));
  yourself) asMorph lock.
  titleMorph margins: (10@0 corner: 10@10).
  titleMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 0) offsets: (0@ 0 corner: 0 @ titleMorph height)).
 
  self
  initializePages;
  initializeButtons;
  initializeControlMorph;
  initializePreviewWorld;
  initializeForLowPerformance.
 
  self
  changeProportionalLayout;
  layoutInset: 20;
+ cellGap: 10;
- cellInset: 10;
  cellPositioning: #center;
  addAllMorphs: {titleMorph. buttonRowMorph. controlMorph. previewWorld. startButton. skipButton. lowPerformanceMorph}.
 
  self addKeyboardCaptureFilter: self.!

Item was changed:
  ----- Method: PreferenceWizardMorph>>initializeButtons (in category 'initialization') -----
  initializeButtons
 
  buttonRowMorph := Morph new
  color: Color transparent;
  changeTableLayout;
  listDirection: #leftToRight;
+ cellGap: 10;
- cellInset: 10;
  layoutInset: (0@20 corner: 0@0);
  vResizing: #shrinkWrap;
  hResizing: #spaceFill;
  yourself.
 
  buttonRowMorph addAllMorphs: {
  previousButton := self createButton action: #previous; label: 'Previous' translated.
  pagesLabel := (self createLabel: '0 / 0') hResizing: #shrinkWrap; margins: (20@0 corner: 20@0); fullBounds; yourself.
  nextButton := self createButton action: #next; label: 'Next' translated.
  self createHorizontalSpacer.
  self createButton action: #showSqueak; label: 'Done' translated}.
 
 
  buttonRowMorph fullBounds.
  buttonRowMorph layoutFrame: (LayoutFrame fractions: (0 @ 1 corner: 1 @ 1) offsets: (0@ buttonRowMorph height negated corner: 0 @ 0)).
 
 
 
  startButton := (self createButton action: #showPlayfield; label: 'Configure' translated).
  skipButton := (self createButton action: #showSqueak; label: 'Skip' translated).
 
  (startButton width max: skipButton width) in: [:w |
  startButton hResizing: #rigid; width: w.
  skipButton hResizing: #rigid; width: w.
 
  startButton layoutFrame: (LayoutFrame fractions: (0.5 @ 0.6 corner: 0.5 @ 0.6) offsets: (2*w negated @ 0 corner: 0 @ 0)).
  skipButton layoutFrame: (LayoutFrame fractions: (0.5 @ 0.6 corner: 0.5 @ 0.6) offsets: (0@ 0 corner: 2*w @ 0))].!