[squeak-dev] The Trunk: ToolBuilder-Morphic-mt.304.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Feb 11 11:16:15 UTC 2022
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.304.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.304
Author: mt
Time: 11 February 2022, 12:16:15.090856 pm
UUID: 67d388cd-be51-d146-a2b5-7c880fd2092a
Ancestors: ToolBuilder-Morphic-mt.303
Complements Morphic-mt.1892
=============== Diff against ToolBuilder-Morphic-mt.303 ===============
Item was changed:
ToolBuilder subclass: #MorphicToolBuilder
instanceVariableNames: 'widgets panes parentMenu'
+ classVariableNames: 'ButtonBorderWidth ButtonMargins ListBorderWidth ListMargins TextBorderWidth TextMargins'
- classVariableNames: 'ButtonBorderWidth ListBorderWidth TextBorderWidth'
poolDictionaries: ''
category: 'ToolBuilder-Morphic'!
!MorphicToolBuilder commentStamp: 'ar 2/11/2005 15:02' prior: 0!
The Morphic tool builder.!
Item was changed:
----- Method: MorphicToolBuilder class>>applyUserInterfaceTheme (in category 'preferences') -----
applyUserInterfaceTheme
TextBorderWidth := nil.
ListBorderWidth := nil.
+ ButtonBorderWidth := nil.
+
+ TextMargins := nil.
+ ListMargins := nil.
+ ButtonMargins := nil.!
- ButtonBorderWidth := nil.!
Item was changed:
----- Method: MorphicToolBuilder class>>themeProperties (in category 'preferences') -----
themeProperties
"Let theme switches clear my cache. See #applyUserInterfaceTheme."
^ {
{ #textBorderWidth. 'tool construction'. ''}.
{ #listBorderWidth. 'tool construction'. ''}.
{ #buttonBorderWidth. 'tool construction'. ''}.
+ { #textMargins. 'tool construction'. ''}.
+ { #listMargins. 'tool construction'. ''}.
+ { #buttonMargins. 'tool construction'. ''}.
}!
Item was changed:
----- Method: MorphicToolBuilder>>buttonRowHeight (in category 'layout hints') -----
buttonRowHeight
+ | multiplier |
+ ButtonMargins ifNil: [
+ ButtonMargins := (PluggableButtonMorph labelMargins
+ ifNil: [0] ifNotNil: [:margins |
+ margins isRectangle
+ ifTrue: [margins top + margins bottom]
+ ifFalse: [margins isPoint
+ ifTrue: [margins y + margins y]
+ ifFalse: [margins + margins]]]) ].
+
+ multiplier := MorphicProject useCompactButtons
+ ifTrue: [1.0] ifFalse: [1.6].
- | defaultMargins |
- defaultMargins := PluggableButtonMorph labelMargins.
- defaultMargins := defaultMargins ifNil: [0] ifNotNil: [:margins |
- margins isRectangle
- ifTrue: [margins top + margins bottom]
- ifFalse: [margins isPoint
- ifTrue: [margins y + margins y]
- ifFalse: [margins + margins]]].
ButtonBorderWidth ifNil: [ButtonBorderWidth := (((UserInterfaceTheme current get: #borderWidth for: PluggableTextMorph) ifNil: [1]) * RealEstateAgent scaleFactor) truncated * 2].
+ ^ (Preferences standardButtonFont lineGrid asFloat * multiplier) truncated "already includes the system's current #scaleFactor"
+ + ButtonMargins "already includes the system's current #scaleFactor"
- ^ (Preferences standardButtonFont lineGrid asFloat * 1.6) truncated "already includes the system's current #scaleFactor"
- + defaultMargins "already includes the system's current #scaleFactor"
+ ButtonBorderWidth!
Item was changed:
----- Method: MorphicToolBuilder>>listHeightFor: (in category 'layout hints') -----
listHeightFor: numLines
+ ListMargins ifNil: [
+ ListMargins := PluggableListMorph listMargins
+ ifNil: [0] ifNotNil: [:margins |
+ margins isRectangle
+ ifTrue: [margins top + margins bottom]
+ ifFalse: [margins isPoint
+ ifTrue: [margins y + margins y]
+ ifFalse: [margins + margins]]] ].
- | defaultMargins |
- defaultMargins := PluggableListMorph listMargins.
- defaultMargins := defaultMargins ifNil: [0] ifNotNil: [:margins |
- margins isRectangle
- ifTrue: [margins top + margins bottom]
- ifFalse: [margins isPoint
- ifTrue: [margins y + margins y]
- ifFalse: [margins + margins]]].
ListBorderWidth ifNil: [ListBorderWidth := (((UserInterfaceTheme current get: #borderWidth for: PluggableTextMorph) ifNil: [1]) * RealEstateAgent scaleFactor) truncated * 2].
^ (Preferences standardListFont lineGridForMorphs * numLines) "already includes the system's current #scaleFactor"
+ + ListMargins "already includes the system's current #scaleFactor"
- + defaultMargins "already includes the system's current #scaleFactor"
+ ListBorderWidth!
Item was changed:
----- Method: MorphicToolBuilder>>textFieldHeightFor:font: (in category 'layout hints') -----
textFieldHeightFor: numLines font: font
+ TextMargins ifNil: [
+ TextMargins := PluggableTextMorph textMargins
+ ifNil: [0] ifNotNil: [:margins |
+ margins isRectangle
+ ifTrue: [margins top + margins bottom]
+ ifFalse: [margins isPoint
+ ifTrue: [margins y + margins y]
+ ifFalse: [margins + margins]]] ].
- | defaultMargins |
- defaultMargins := PluggableTextMorph textMargins.
- defaultMargins := defaultMargins ifNil: [0] ifNotNil: [:margins |
- margins isRectangle
- ifTrue: [margins top + margins bottom]
- ifFalse: [margins isPoint
- ifTrue: [margins y + margins y]
- ifFalse: [margins + margins]]].
TextBorderWidth ifNil: [TextBorderWidth := (((UserInterfaceTheme current get: #borderWidth for: PluggableTextMorph) ifNil: [1]) * RealEstateAgent scaleFactor) truncated * 2].
^ (font lineGrid * numLines) "already includes the system's current #scaleFactor"
+ + TextMargins "already includes the system's current #scaleFactor"
- + defaultMargins "already includes the system's current #scaleFactor"
+ TextBorderWidth!
More information about the Squeak-dev
mailing list
|