-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
656 changed files
with
2,033 additions
and
1,378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
A MDAppBar is part of the Material Design toolbar. It contains a label and a menu button. | ||
|
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDAppBar.class/class/defaultBackgroundColor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
properties | ||
defaultBackgroundColor | ||
|
||
^ MDColorTheme currentTheme primaryColor |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDAppBar.class/instance/addLabel..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
components | ||
addLabel: aLabel | ||
|
||
self addMorphBack: aLabel |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDAppBar.class/instance/addMenuControl..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
components | ||
addMenuControl: aMenuControl | ||
|
||
self addMorphBack: aMenuControl |
8 changes: 8 additions & 0 deletions
8
packages/Material-Core.package/MDAppBar.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
vResizing: #spaceFill; | ||
backgroundColor: self class defaultBackgroundColor; | ||
addDropShadow |
7 changes: 7 additions & 0 deletions
7
packages/Material-Core.package/MDAppBar.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"class" : { | ||
"defaultBackgroundColor" : "wb 7/11/2019 14:03" }, | ||
"instance" : { | ||
"addLabel:" : "wb 7/11/2019 14:49", | ||
"addMenuControl:" : "wb 7/11/2019 14:47", | ||
"initialize" : "wb 7/12/2019 15:16" } } |
14 changes: 14 additions & 0 deletions
14
packages/Material-Core.package/MDAppBar.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "Material-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "wb 7/24/2019 16:28", | ||
"instvars" : [ | ||
], | ||
"name" : "MDAppBar", | ||
"pools" : [ | ||
], | ||
"super" : "MDWidget", | ||
"type" : "normal" } |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/alwaysUppercase.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
alwaysUppercase | ||
|
||
^ true |
4 changes: 0 additions & 4 deletions
4
packages/Material-Core.package/MDButton.class/class/backgroundColorToggled.st
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/class/defaultBackgroundColor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
properties | ||
defaultBackgroundColor | ||
|
||
^ MDColorTheme currentTheme secondaryColor |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/class/defaultBackgroundColorToggled.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
properties | ||
defaultBackgroundColorToggled | ||
|
||
^ MDColorTheme currentTheme secondaryColorDarkest |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultBorderRadius.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultBorderRadius | ||
|
||
^ 2 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultElevatedSizeDifference.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultElevatedSizeDifference | ||
|
||
^ 1 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultHeight.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultHeight | ||
|
||
^ 36 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultIconPadding.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultIconPadding | ||
|
||
^ 12 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultIconSize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultIconSize | ||
|
||
^ 18 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultIconTextPadding.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultIconTextPadding | ||
|
||
^ 8 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultPadding.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultPadding | ||
|
||
^ 16 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultShadowScaler.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultShadowScaler | ||
|
||
^ 1.2 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/defaultText.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultText | ||
|
||
^ 'BUTTON' |
4 changes: 2 additions & 2 deletions
4
packages/Material-Core.package/MDButton.class/class/defaultTextColor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
defaultTextColor | ||
|
||
^ '#FFFFFF' | ||
^ MDColorTheme currentTheme textColorOn: self defaultBackgroundColor |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/class/defaultTextColorToggled.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
properties | ||
defaultTextColorToggled | ||
|
||
^ MDColorTheme currentTheme textColorOn: self defaultBackgroundColorToggled |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/minWidth.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
minWidth | ||
|
||
^ 64 |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/class/minimumPadding.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
properties | ||
minimumPadding | ||
|
||
^ 5 |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/class/textDisabledAlpha.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
default properties | ||
properties | ||
textDisabledAlpha | ||
|
||
^ 0.6 |
8 changes: 8 additions & 0 deletions
8
packages/Material-Core.package/MDButton.class/instance/backgroundColorToggled..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
accessing | ||
backgroundColorToggled: aValue | ||
|
||
| value | | ||
|
||
value := self setProperty: #backgroundColorToggled to: (self colorFrom: aValue). | ||
|
||
^ value |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/instance/backgroundColorToggled.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
backgroundColorToggled | ||
|
||
^ self properties at: #backgroundColorToggled ifAbsent: [^ self backgroundColorToggled: self class defaultBackgroundColorToggled] |
6 changes: 0 additions & 6 deletions
6
packages/Material-Core.package/MDButton.class/instance/calculateTextColor.st
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
packages/Material-Core.package/MDButton.class/instance/calculateWidthByText.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
packages/Material-Core.package/MDButton.class/instance/checkToggled.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
drawing | ||
checkToggled | ||
|
||
(self isEnabled and: self isToggled) ifTrue: [ | ||
self currentBackgroundColor: self class backgroundColorToggled] | ||
self isEnabled ifTrue: [ | ||
(self isToggled) | ||
ifTrue: [ | ||
self currentBackgroundColor: self backgroundColorToggled. | ||
self currentTextColor: self textColorToggled] | ||
ifFalse: [ | ||
self currentBackgroundColor: self backgroundColor. | ||
self currentTextColor: self textColor]] |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/instance/currentTextColor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
currentTextColor: aColor | ||
|
||
self label color: aColor |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/instance/currentTextColor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
currentTextColor | ||
|
||
^ self label color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/Material-Core.package/MDButton.class/instance/labelContents..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
accessing | ||
labelContents: anObject | ||
|
||
self label contents: anObject. | ||
self updateBounds. | ||
|
||
^ anObject |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/instance/labelShrinkThreshold.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
drawing | ||
labelShrinkThreshold | ||
|
||
^ (self label font widthOf: $m) * 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/instance/textColorDisabled.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
textColorDisabled | ||
|
||
^ (self class gray: self backgroundColor) alpha: self class textDisabledAlpha | ||
^ (self class gray: self textColor) alpha: self class textDisabledAlpha |
8 changes: 8 additions & 0 deletions
8
packages/Material-Core.package/MDButton.class/instance/textColorToggled..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
accessing | ||
textColorToggled: aValue | ||
|
||
| value | | ||
|
||
value := self setProperty: #textColorToggled to: (self colorFrom: aValue). | ||
|
||
^ value |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDButton.class/instance/textColorToggled.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
textColorToggled | ||
|
||
^ self properties at: #textColorToggled ifAbsent: [^ self textColorToggled: self class defaultTextColorToggled] |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDButton.class/instance/toggleOn.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
event handling | ||
toggleOn | ||
|
||
self isDisabled ifTrue: [^ false]. | ||
self isDisabled ifTrue: [^ self]. | ||
self toggled: true |
5 changes: 3 additions & 2 deletions
5
packages/Material-Core.package/MDButton.class/instance/updateContents..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
drawing | ||
updateContents: aCanvas | ||
|
||
self updateLabelPosition. | ||
self updateIcons | ||
self updateIcons. | ||
self updateLabelExtent. | ||
self updateLabelPosition |
16 changes: 16 additions & 0 deletions
16
packages/Material-Core.package/MDButton.class/instance/updateLabelExtent.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
drawing | ||
updateLabelExtent | ||
|
||
| availableWidth | | ||
|
||
availableWidth := self width. | ||
self hasIcon ifTrue: [availableWidth := availableWidth - self icon width]. | ||
self hasIconRight ifTrue: [availableWidth := availableWidth - self iconRight width]. | ||
availableWidth := availableWidth - (self class minimumPadding * 2). | ||
|
||
availableWidth < self labelShrinkThreshold | ||
ifTrue: [self label shrink] | ||
ifFalse: [ | ||
self label expand. | ||
availableWidth < self label fullWidth | ||
ifTrue: [self label width: availableWidth]] |
Oops, something went wrong.