[squeak-dev] The Trunk: Morphic-mt.1835.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 30 14:40:41 UTC 2021


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

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

Name: Morphic-mt.1835
Author: mt
Time: 30 December 2021, 3:40:36.441748 pm
UUID: 0a8ee7c2-c773-104a-8432-b175dcfc3a9c
Ancestors: Morphic-mt.1834

Fixes some scaling issues that especially matter for 200% and above.

=============== Diff against Morphic-mt.1834 ===============

Item was changed:
  ----- Method: DialogWindow>>createBody (in category 'initialization') -----
  createBody
  
  	| body |
  	body := Morph new
  		name: 'Body';
  		changeTableLayout;
  		hResizing: #shrinkWrap;
  		vResizing: #shrinkWrap;
  		rubberBandCells: true;
  		listDirection: #topToBottom;
+ 		layoutInset: ((10 at 5 * RealEstateAgent scaleFactor) rounded corner: (10 at 10 * RealEstateAgent scaleFactor) rounded);
+ 		cellGap: (5 * RealEstateAgent scaleFactor) rounded;
- 		layoutInset: (10 at 5 corner: 10 at 10);
- 		cellGap: 5;
  		color: Color transparent;
  		yourself.
  	body addAllMorphs: {self createMessage: ''. self createPane. self createButtonRow. self createFilter}.
  	self addMorphBack: body.!

Item was changed:
  ----- Method: DialogWindow>>createButtonRow (in category 'initialization') -----
  createButtonRow
  
  	^ buttonRow := Morph new
  		name: 'Buttons';
  		color: Color transparent;
  		changeTableLayout;
  		vResizing: #shrinkWrap;
  		hResizing: #spaceFill;
  		listDirection: #leftToRight;
  		listCentering: #center;
+ 		cellGap: (5 * RealEstateAgent scaleFactor) rounded;
- 		cellGap: 5;
  		yourself!

Item was changed:
  ----- Method: DialogWindow>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	self
  		color: (self userInterfaceTheme color ifNil: [Color white]);
  		borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle simple]) copy;
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]);
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated;
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]);
  		layoutInset: ((self class roundedDialogCorners and: [self class gradientDialog])
  			"This check compensates a bug in balloon."
  			ifTrue: [0] ifFalse: [self borderWidth negated asPoint]).
  
  	Preferences menuAppearance3d ifTrue: [self addDropShadow].!

Item was changed:
  ----- Method: DialogWindow>>setTitleParameters (in category 'initialization') -----
  setTitleParameters
  
+ 	| scaleFactor |
+ 	scaleFactor := RealEstateAgent scaleFactor.
  	(self submorphNamed: #title) ifNotNil: [:title |
  		title
  			fillStyle: (self class gradientDialog
  				ifFalse: [SolidFillStyle color: (self userInterfaceTheme titleColor ifNil: [Color r: 0.658 g: 0.678 b: 0.78])]
  				ifTrue: [self titleGradientFor: title from: (self userInterfaceTheme titleColor ifNil: [Color r: 0.658 g: 0.678 b: 0.78])]);
  			borderStyle: (self userInterfaceTheme titleBorderStyle ifNil: [BorderStyle simple]) copy;
  			borderColor: (self userInterfaceTheme titleBorderColor ifNil: [Color r: 0.6 g: 0.7 b: 1]);
  			borderWidth: (self userInterfaceTheme titleBorderWidth ifNil: [0]);
  			cornerStyle: (self wantsRoundedCorners ifTrue: [#rounded] ifFalse: [#square]);
  			vResizing: #shrinkWrap;
  			hResizing: #spaceFill;
+ 			cellGap: (5 * scaleFactor) rounded;
+ 			layoutInset: ((5 at 3 * scaleFactor) rounded
+ 				corner: (5 at 2 * scaleFactor) rounded
+ 					+ (self wantsRoundedCorners ifFalse: [0 at 0] ifTrue: [0 at self cornerRadius]) )].
- 			cellGap: 5;
- 			layoutInset: (5 at 3 corner: 5@ (2+(self wantsRoundedCorners ifFalse: [0] ifTrue: [self cornerRadius])))].
  	
  	titleMorph ifNotNil: [
  		| fontToUse colorToUse |
  		fontToUse := self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont].
  		colorToUse := self userInterfaceTheme titleTextColor ifNil: [Color black].
  	
  		"Temporary HACK for 64-bit CI build. Can be removed in the future."
  		titleMorph contents isText ifFalse: [^ self].
  		
  		titleMorph
  			hResizing: #spaceFill;
  			vResizing: #shrinkWrap.
  	
  		titleMorph contents
  			addAttribute: (TextFontReference toFont: fontToUse);
  			addAttribute: (TextColor color: colorToUse);
  			addAttribute: TextAlignment centered].!

Item was changed:
  ----- Method: FillInTheBlankMorph class>>defaultAnswerExtent (in category 'default constants') -----
  defaultAnswerExtent
+ 	^  ((TextStyle defaultFont widthOf: $x) * 30) @ (3 * TextStyle defaultFont height)!
- 	^  (200@ (3 * Preferences standardDefaultTextFont height))!

Item was changed:
  ----- Method: MenuMorph>>addLine (in category 'construction') -----
  addLine
  	"Append a divider line to this menu. Suppress duplicate lines."
  
  	| colorToUse |
  	self hasItems ifFalse: [^ self].
  	self lastSubmorph knownName = #line ifTrue: [^ self].
  	
  	colorToUse := self userInterfaceTheme lineColor ifNil: [Color gray: 0.9].
  	self addMorphBack: (Morph new
  		color: colorToUse;
  		hResizing: #spaceFill;
+ 		height: ((self userInterfaceTheme lineWidth ifNil: [2]) * RealEstateAgent scaleFactor) truncated;
- 		height: (self userInterfaceTheme lineWidth ifNil: [2]);
  		borderStyle: (self userInterfaceTheme lineStyle ifNil: [BorderStyle inset]);
  		borderColor: colorToUse;
+ 		borderWidth: "1 *" RealEstateAgent scaleFactor truncated;
- 		borderWidth: 1;
  		name: #line; "see above"
  		yourself).!

Item was changed:
  ----- Method: MenuMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	self
  		color: (self userInterfaceTheme color ifNil: [Color r: 0.9 g: 0.9 b: 0.9]);
  		borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle simple]) copy;
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]);
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated.
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
  
  	Preferences menuAppearance3d ifTrue: [self addDropShadow].
  	
+ 	self layoutInset: (3 * RealEstateAgent scaleFactor) truncated.
- 	self layoutInset: 3.
  !

Item was changed:
  ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') -----
  keyboardFocusWidth
  
+ 	^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) truncated!
- 	^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]!

Item was changed:
  ----- Method: NewBalloonMorph>>bubbleInset (in category 'geometry') -----
  bubbleInset
  
+ 	^ (5 at 2 * RealEstateAgent scaleFactor) rounded!
- 	^ 5 at 2!

Item was changed:
  ----- Method: NewBalloonMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  
  	self
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated;
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]);
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color r: 0.46 g: 0.46 b: 0.353]);
  		color: (self userInterfaceTheme color ifNil: [Color r: 0.92 g: 0.92 b: 0.706]);
  		hasDropShadow: (Preferences menuAppearance3d and: [self color isTranslucent not]);
  		shadowOffset: 1 at 1;
  		shadowColor: (self color muchDarker muchDarker alpha: 0.333);
  		orientation: #bottomLeft;
  		cornerStyle: (MenuMorph roundedMenuCorners ifTrue: [#rounded] ifFalse: [#square]).!

Item was changed:
  ----- Method: NewBalloonMorph>>tailHeight (in category 'geometry') -----
  tailHeight
  	
+ 	^ (8 * RealEstateAgent scaleFactor) rounded!
- 	^ 8!

Item was changed:
  ----- Method: NewBalloonMorph>>tailOffset (in category 'geometry') -----
  tailOffset
  
+ 	^ (((Dictionary newFrom: {
- 	^ (Dictionary newFrom: {
  		#topLeft -> (5 at 0).
  		#topRight -> (-3 at 0).
  		#bottomLeft -> (1@ -1).
+ 		#bottomRight -> (-3 @ -3)}) at: self orientation) * RealEstateAgent scaleFactor) truncated!
- 		#bottomRight -> (-3 @ -3)}) at: self orientation!

Item was changed:
  ----- Method: NewBalloonMorph>>tailWidth (in category 'geometry') -----
  tailWidth
  	
+ 	^ (15 * RealEstateAgent scaleFactor) rounded!
- 	^ 15!

Item was changed:
  ----- Method: NewBalloonMorph>>verticesForTail (in category 'drawing') -----
  verticesForTail
  
  	| offset factorX factorY tpos bpos |
+ 	offset := (5 * RealEstateAgent scaleFactor) rounded + (self wantsRoundedCorners
- 	offset := 5 + (self wantsRoundedCorners
  		ifTrue: [self cornerRadius]
  		ifFalse: [0]).
  	tpos := self tailPosition.
  	factorX := tpos x < self center x ifTrue: [1] ifFalse: [-1].
  	factorY := tpos y > self center y ifTrue: [1] ifFalse: [-1].
  	bpos := self bubbleBounds perform: self orientation.
  		
  	^ {
  		tpos.
  		bpos + (((offset + self tailWidth) * factorX) @ (self borderStyle width negated * factorY)).
  		bpos + ((offset * factorX) @ (self borderStyle width negated * factorY)).}!

Item was changed:
  ----- Method: PluggableButtonMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	self
  		color: (self userInterfaceTheme color ifNil: [Color gray: 0.91]);
  		borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]) copy;
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]);
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated;
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]);
  		font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]);
  		textColor: (self userInterfaceTheme textColor ifNil: [Color black]).
  
  	borderColor := self borderColor.
  	self	offColor: self color.!

Item was changed:
  ----- Method: ScrollBar>>setDefaultParameters (in category 'initialize') -----
  setDefaultParameters
  
  	"Compared to generic sliders, I am not my own paging area. Thus, make me transparent."
  	self
  		color: Color transparent;
  		borderWidth: 0.
  
  	pagingArea
  		color: (self userInterfaceTheme color ifNil: [Color veryVeryLightGray darker alpha: 0.35]);
  		borderWidth: 0. "no border for the paging area"
  
  	slider
  		color: (self userInterfaceTheme thumbColor ifNil: [Color veryVeryLightGray]);
  		borderColor: (self userInterfaceTheme thumbBorderColor ifNil: [Color gray: 0.6]);
+ 		borderWidth: ((self userInterfaceTheme thumbBorderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated.
- 		borderWidth: (self userInterfaceTheme thumbBorderWidth ifNil: [1]).
  	
  	self updateSliderCornerStyle.
  	
  	sliderShadow
  		cornerStyle: slider cornerStyle;
  		borderWidth: slider borderWidth;
  		borderColor: Color transparent.
  	
  	sliderColor := slider color.
  	self updateSliderColor: slider color.!

Item was changed:
  ----- Method: ScrollPane>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	self
  		color: (self userInterfaceTheme color ifNil: [Color white]);
  		borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle simple]) copy;
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray: 0.6]);
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated.!
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).!

Item was changed:
  ----- Method: Slider>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	self
  		color: (self userInterfaceTheme color ifNil: [Color lightGray]);
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]);
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated.
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
  	
  	slider
  		color: (self userInterfaceTheme thumbColor ifNil: [Color veryVeryLightGray]);
  		borderColor: (self userInterfaceTheme thumbBorderColor ifNil: [Color gray: 0.6]);
  		borderWidth: (self userInterfaceTheme thumbBorderWidth ifNil: [0]).
  
  	sliderShadow
  		borderWidth: slider borderWidth;
  		borderColor: Color transparent.
  
  	sliderColor := slider color.
  	self updateSliderColor: slider color.!

Item was changed:
  ----- Method: SystemProgressMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  	"change the receiver's appareance parameters"
  
  	self
  		color: (self userInterfaceTheme color ifNil: [Color r: 0.9 g: 0.9 b: 0.9]);
  		borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle simple]) copy;
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]);
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated.
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
  
  	Preferences menuAppearance3d ifTrue: [self addDropShadow].
  
  	self
  		font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]);
  		textColor: (self userInterfaceTheme textColor ifNil: [Color black]).
  
  	self
  		updateColor: self
  		color: self color
  		intensity: 1.!

Item was changed:
  ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  
  	Preferences menuAppearance3d
  		ifFalse: [self hasDropShadow: false]
  		ifTrue: [
  			self addDropShadow.
  			self hasDropShadow: self isKeyWindow. "maybe turn off again"].
  	
+ 	self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated.
- 	self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
  	label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!

Item was changed:
  ----- Method: TransferMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  
  	self
+ 		borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) truncated;
- 		borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]);
  		borderColor: (self userInterfaceTheme borderColor ifNil: [Color r: 0.46 g: 0.46 b: 0.353]);
  		color: (self userInterfaceTheme color ifNil: [Color r: 0.92 g: 0.92 b: 0.706]);
  		cornerStyle: (MenuMorph roundedMenuCorners ifTrue: [#rounded] ifFalse: [#square]).
  		
  	self updateGradient.!



More information about the Squeak-dev mailing list