@@ -40,41 +40,53 @@ function transformAnimationValues(values: AnimationDefinition[]) {
40
40
} ) ;
41
41
}
42
42
43
+ const defaultSpeedDialItemTitleRippleColor = new Color ( '#797979' ) ;
44
+ const defaultSpeedDialItemTitleBackgroundColor = new Color ( 'white' ) ;
45
+
43
46
@CSSType ( 'MDSpeedDialItemTitle' )
44
47
export class SpeedDialItemTitle extends Button {
45
48
constructor ( ) {
46
49
super ( ) ;
47
50
this . verticalAlignment = 'middle' ;
48
51
this . style [ 'css:text-transform' ] = 'none' ;
49
- this . style [ 'css:background-color' ] = 'white' ;
50
- this . style [ 'css:ripple-color' ] = '#797979' ;
51
- this . style [ 'css:color' ] = '#797979' ;
52
- this . style [ 'css:elevation' ] = 2 ;
52
+ this . style [ 'css:background-color' ] = defaultSpeedDialItemTitleBackgroundColor ;
53
+ this . style [ 'css:ripple-color' ] = defaultSpeedDialItemTitleRippleColor ;
54
+ this . style [ 'css:color' ] = defaultSpeedDialItemTitleRippleColor ;
55
+ this . style [ 'css:elevation' ] = 1 ;
53
56
this . style [ 'css:border-radius' ] = 6 ;
54
57
this . style [ 'css:font-size' ] = 10 ;
55
58
this . style [ 'css:min-width' ] = 0 ;
56
59
this . style [ 'css:min-height' ] = 0 ;
57
60
this . style [ 'css:padding' ] = 4 ;
58
61
}
62
+ getDefaultElevation ( ) : number {
63
+ return 1 ;
64
+ }
65
+
66
+ getDefaultDynamicElevationOffset ( ) : number {
67
+ return 2 ;
68
+ }
59
69
}
60
70
@CSSType ( 'MDSpeedDialItemButton' )
61
71
export class SpeedDialItemButton extends Button {
62
72
constructor ( ) {
63
73
super ( ) ;
64
74
this . verticalAlignment = 'middle' ;
65
75
this . style [ 'css:font-size' ] = 26 ;
66
- // this.style['css:border-radius'] = 28;
67
- // this.style['css:width'] = 56;
68
- // this.style['css:height'] = 56;
69
- // this.style['css:margin'] = 16;
70
- // this.style['css:dynamic-elevation-offset'] = 2;
71
- // this.style['css:font-size'] = 26;
76
+ this . style [ 'css:elevation' ] = 6 ;
77
+ // this.style['css:dynamic-elevation-offset'] = 6;
78
+ }
79
+ getDefaultElevation ( ) : number {
80
+ return 6 ;
81
+ }
82
+
83
+ getDefaultDynamicElevationOffset ( ) : number {
84
+ return 6 ;
72
85
}
73
86
}
74
87
@CSSType ( 'MDSpeedDialButton' )
75
- export class SpeedDialButton extends SpeedDialItemButton {
88
+ export class SpeedDialButton extends SpeedDialItemButton { }
76
89
77
- }
78
90
@CSSType ( 'MDSpeedDialItem' )
79
91
export class SpeedDialItem extends SpeedDialItemBase {
80
92
public actualActive : boolean = false ;
@@ -99,13 +111,11 @@ export class SpeedDialItem extends SpeedDialItemBase {
99
111
this . button . style [ 'css:width' ] = 40 ;
100
112
this . button . style [ 'css:height' ] = 40 ;
101
113
this . button . style [ 'css:margin' ] = 16 ;
102
- this . button . style [ 'css:dynamic-elevation-offset' ] = 2 ;
103
114
} else {
104
115
this . button . style [ 'css:border-radius' ] = 28 ;
105
116
this . button . style [ 'css:width' ] = 56 ;
106
117
this . button . style [ 'css:height' ] = 56 ;
107
118
this . button . style [ 'css:margin' ] = 16 ;
108
- this . button . style [ 'css:dynamic-elevation-offset' ] = 4 ;
109
119
}
110
120
( this as any ) . columns = this . fabColumns ;
111
121
this . addChild ( this . titleView ) ;
0 commit comments