[squeak-dev] The Trunk: PreferenceBrowser-mt.125.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Dec 31 13:47:02 UTC 2021

Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:

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

Name: PreferenceBrowser-mt.125
Author: mt
Time: 31 December 2021, 2:47:02.385589 pm
UUID: 29599ad7-e40a-8049-bf8f-d35555f8b0a4
Ancestors: PreferenceBrowser-mt.124

I forgot to update the balloon texts.

Note that this method needs clean up but I am exhausted right now. At least that messy style is confined in PreferenceWizardMorph.

=============== Diff against PreferenceBrowser-mt.124 ===============

Item was changed:
  ----- Method: PreferenceWizardMorph>>updateFromChangedScaleFactor (in category 'display scale') -----
  	previewWorld delete.
  	previewWorld := nil.
  	DisplayScreen displayIsFullScreen ifFalse: [
  		DisplayScreen setNewScreenSize: (self defaultExtent * RealEstateAgent scaleFactor) rounded].
  	checkmark := nil.
  	radiomark := nil.
  		layoutInset: (self defaultFont widthOf: $x) * 2;
  		cellGap: (self defaultFont widthOf: $x).
  		font: (UserInterfaceTheme current get: #wizardTitleFont);
  		margins: (self cellGap @ 0 corner: self cellGap @ self cellGap).
  	titleMorph layoutFrame
  		bottomOffset: titleMorph height.
  	self updateLowPerformanceLabel: lowPerformanceMorph contents.
  	{startButton. skipButton. previousButton. nextButton. doneButton},
  		(pages gather: [:page | page allMorphs select: [:ea | ea isButton]])
  			do: [:button |
  				((button owner hasProperty: #isRadioButton)
  					or: [button owner hasProperty: #isCheckbox])
  						ifTrue: [
  								"layoutInset: 0;"
  								extent: (TextStyle defaultFont height * 1.75) asPoint;
  								update: button getLabelSelector.
+ 							button owner cellGap: (TextStyle defaultFont widthOf: $x).
+ 							button owner balloonText ifNotNil: [:text |
+ 								text addAttribute: (TextFontReference toFont: (UserInterfaceTheme current get: #wizardHelpFont))]]
- 							button owner cellGap: (TextStyle defaultFont widthOf: $x)]
  						ifFalse: [
  								layoutInset: self defaultButtonMargins].
  					borderWidth: (2 * RealEstateAgent scaleFactor) truncated;
  					font: (UserInterfaceTheme current get: #wizardButtonFont);
  					updateMinimumExtent "Font might not change but PPI did."].
  	self fullBounds.
  	(startButton minimumWidth max: skipButton minimumWidth) in: [:w |
  		startButton hResizing: #rigid; width: w.
  		skipButton hResizing: #rigid; width: w.
  		startButton layoutFrame leftOffset: 2*w negated.
  		skipButton layoutFrame rightOffset: 2*w].
  	(previousButton minimumWidth max: nextButton minimumWidth) in: [:w |
  		previousButton hResizing: #rigid; width: w.
  		nextButton hResizing: #rigid; width: w].
  		margins: (self layoutInset at 0 corner: self layoutInset at 0);
  		font: (UserInterfaceTheme current get: #wizardStandardFont).
  		cellGap: self cellGap;
  		layoutInset: (0 at self layoutInset corner: 0 at 0).
  	buttonRowMorph layoutFrame
  		topOffset: buttonRowMorph fullBounds height negated.
  	{controlMorph firstSubmorph}, (pages gather: [:page | page allMorphs select: [:ea | ea isTextMorph]])
  		do: [:label |
  				font: (UserInterfaceTheme current get: #wizardStandardFont);
  				margins: self defaultTextMargins
  			"No need for #releaseParagraph because window resizing will happen anyway."].
  	controlMorph layoutInset: (0 at 0 corner: self cellGap at 0).
  	controlMorph layoutFrame
  		topOffset: titleMorph height;
  		bottomOffset: buttonRowMorph height negated.
  	"scroll panes in pages"
  	pages do: [:page | | scrollPane |
  			layoutInset: (self layoutInset asPoint corner: self cellGap at 0);
  			cellGap: self cellGap.
  		scrollPane := page submorphs second.
  		scrollPane scrollBarThickness: self layoutInset.
  		scrollPane scroller firstSubmorph
  			cellGap: self cellGap;
  			layoutInset: (0 at 0 corner: self cellGap at 0).
  		(scrollPane vScrollBar instVarNamed: #slider)
  			borderWidth: (2 * RealEstateAgent scaleFactor) truncated].
  	self initializePreviewWorld.
  	self addMorph: previewWorld.
  	self step.
  "	previewWorld borderWidth: (2 * RealEstateAgent scaleFactor) truncated.
  	previewWorld layoutFrame
  		topOffset: titleMorph height;
  		bottomOffset: buttonRowMorph height negated.
  "	!

More information about the Squeak-dev mailing list