[squeak-dev] The Trunk: Morphic-ct.1994.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 11 12:53:22 UTC 2023


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

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

Name: Morphic-ct.1994
Author: ct
Time: 19 May 2022, 1:23:51.16178 pm
UUID: 114c8aca-e31d-444d-8cc2-d19bebd28cdc
Ancestors: Morphic-ct.1993

Minor UI improvement to FontImporter: Use menu style for the previewText button and make the buttons in the preview slightly larger to avoid overlapping texts.

=============== Diff against Morphic-ct.1993 ===============

Item was changed:
  ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'ui - building') -----
  buildPreviewPaneWith: builder
  	"Build the preview panel. Offer the user the change preview text through the default font, point size, extra (glyph) scale and extra (line) gap."
  	
  	^ builder pluggablePanelSpec new
  "		wantsResizeHandles: true;"
  		children: {
  			builder pluggablePanelSpec new
  				children: {
  					builder pluggableButtonSpec new
  						model: self;
  						help: #previewTextButtonHelp;
  						label: #previewTextButtonLabel;
  						action: #offerPreviewTextMenu;
+ 						style: #menuButton;
+ 						frame: (LayoutFrame fractions: (0 at 0 corner: 0.2 at 1));
- 						frame: (LayoutFrame fractions: (0 at 0 corner: 0.15 at 1));
  						yourself.
  						
  					builder pluggableInputFieldSpec new
  						model: self;
  						help: 'Type custom preview text here...' translated;
  						getText: #customPreviewText;
  						setText: #acceptCustomPreviewText:;
  						editText: #editCustomPreviewText:;
  						plainTextOnly: true;
+ 						frame: (LayoutFrame fractions: (0.2 at 0 corner: 0.8 at 1));
- 						frame: (LayoutFrame fractions: (0.15 at 0 corner: 0.85 at 1));
  						yourself.
  						
  					builder pluggableButtonSpec new
  						model: self;
  						help: 'Click to see current preview text using the system''s current fonts for comparison' translated;
  						label: 'Compare' translated;
  						action: #browseSystemFonts;
+ 						frame: (LayoutFrame fractions: (0.8 at 0 corner: 1 at 1));
- 						frame: (LayoutFrame fractions: (0.85 at 0 corner: 1 at 1));
  						yourself };
  				frame:  (LayoutFrame
  					fractions: (0 at 0 corner: 1 at 0)
  					offsets: (0 at 0 corner: 0@ self customPreviewTextHeight));
  				yourself.
  				
  			builder pluggableTextSpec new
  				model: self;
  				getText: #previewText;
  				textStyle: #selectedFontTextStyle;
  				askBeforeDiscardingEdits: false;
  				indicateUnacceptedChanges: false;
  				softLineWrap: false;
  				padding: self previewTextPadding;
  				stylerClass: (TextStyler for: #Smalltalk);
  				menu: #previewTextMenu:shifted:;
  				frame: (LayoutFrame
  					fractions: (0 at 0 corner: 1 at 1)
  					offsets: (0 @ self customPreviewTextHeight corner: 0@ self configurationPanelHeight negated));
  				yourself.
  				
  			builder pluggablePanelSpec new name: #configPanel; children: (Array streamContents: [:s | | n |
  				n := 0.
  				self fontConfigurationSpecs groupsDo: [:kind :get :help :label :group | | w |
  					kind caseOf: {
  						[#spacer] -> [
  							w := builder pluggableSpacerSpec new fillSpaceHorizontally].
  						[#button] -> [
  							w := builder pluggableButtonSpec new
  								model: self; label: label; action: get; help: help; yourself].
  						[#text] -> [
  							w := builder pluggableInputFieldSpec new
  								model: self; getText: get; setText: get asSimpleSetter;
  								help: help; plainTextOnly: true; yourself].
  					} otherwise: [ "Ignore" ].
  					w ifNotNil: [ "Remember the group. See #toggleEditMode"
  						w name: (group, (n := n + 1)) asSymbol.
  						s nextPut: w] ]]);
  				layout: #horizontal;
  				frame: self configurationPanelFrame;
  				yourself.
  		};
  		yourself!



More information about the Squeak-dev mailing list