Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
3c9a67d4
Commit
3c9a67d4
authored
Sep 26, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added shadow depth
parent
507affe6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
Source/FlatButton.swift
+1
-1
Source/MaterialButton.swift
+3
-3
Source/MaterialTheme.swift
+4
-4
Source/MaterialView.swift
+4
-4
Source/NavigationBarView.swift
+1
-1
No files found.
Source/FlatButton.swift
View file @
3c9a67d4
...
@@ -38,7 +38,7 @@ public class FlatButton : MaterialButton {
...
@@ -38,7 +38,7 @@ public class FlatButton : MaterialButton {
//
//
internal
override
func
prepareLayer
()
{
internal
override
func
prepareLayer
()
{
super
.
prepareLayer
()
super
.
prepareLayer
()
shadow
=
MaterialTheme
.
button
.
flat
.
shadow
shadow
Depth
=
MaterialTheme
.
button
.
flat
.
shadowDepth
shadowColor
=
MaterialTheme
.
button
.
flat
.
shadowColor
shadowColor
=
MaterialTheme
.
button
.
flat
.
shadowColor
zPosition
=
MaterialTheme
.
button
.
flat
.
zPosition
zPosition
=
MaterialTheme
.
button
.
flat
.
zPosition
masksToBounds
=
MaterialTheme
.
button
.
flat
.
masksToBounds
masksToBounds
=
MaterialTheme
.
button
.
flat
.
masksToBounds
...
...
Source/MaterialButton.swift
View file @
3c9a67d4
...
@@ -145,11 +145,11 @@ public class MaterialButton : UIButton {
...
@@ -145,11 +145,11 @@ public class MaterialButton : UIButton {
}
}
/**
/**
:name: shadow
:name: shadow
Depth
*/
*/
public
var
shadow
:
MaterialShadow
!
{
public
var
shadow
Depth
:
MaterialShadow
!
{
didSet
{
didSet
{
let
value
:
MaterialShadowType
=
MaterialShadowToValue
(
shadow
)
let
value
:
MaterialShadowType
=
MaterialShadowToValue
(
shadow
Depth
)
shadowOffset
=
value
.
offset
shadowOffset
=
value
.
offset
shadowOpacity
=
value
.
opacity
shadowOpacity
=
value
.
opacity
shadowRadius
=
value
.
radius
shadowRadius
=
value
.
radius
...
...
Source/MaterialTheme.swift
View file @
3c9a67d4
...
@@ -37,7 +37,7 @@ public extension MaterialTheme.view {
...
@@ -37,7 +37,7 @@ public extension MaterialTheme.view {
public
static
let
height
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
height
public
static
let
height
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
height
// shadow
// shadow
public
static
let
shadow
:
MaterialShadow
=
.
Depth0
public
static
let
shadow
Depth
:
MaterialShadow
=
.
Depth0
public
static
let
shadowColor
:
UIColor
=
MaterialColor
.
blueGrey
.
darken4
public
static
let
shadowColor
:
UIColor
=
MaterialColor
.
blueGrey
.
darken4
// shape
// shape
...
@@ -73,7 +73,7 @@ public extension MaterialTheme.navigation {
...
@@ -73,7 +73,7 @@ public extension MaterialTheme.navigation {
public
static
let
height
:
CGFloat
=
70
public
static
let
height
:
CGFloat
=
70
// shadow
// shadow
public
static
let
shadow
:
MaterialShadow
=
.
Depth1
public
static
let
shadow
Depth
:
MaterialShadow
=
.
Depth1
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
// shape
// shape
...
@@ -104,7 +104,7 @@ public extension MaterialTheme.navigation {
...
@@ -104,7 +104,7 @@ public extension MaterialTheme.navigation {
// button
// button
public
extension
MaterialTheme
.
button
{
public
extension
MaterialTheme
.
button
{
// shadow
// shadow
public
static
let
shadow
:
MaterialShadow
=
.
Depth0
public
static
let
shadow
Depth
:
MaterialShadow
=
.
Depth0
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
// shape
// shape
...
@@ -133,7 +133,7 @@ public extension MaterialTheme.button {
...
@@ -133,7 +133,7 @@ public extension MaterialTheme.button {
// button.flat
// button.flat
public
extension
MaterialTheme
.
button
.
flat
{
public
extension
MaterialTheme
.
button
.
flat
{
// shadow
// shadow
public
static
let
shadow
:
MaterialShadow
=
MaterialTheme
.
button
.
shadow
public
static
let
shadow
Depth
:
MaterialShadow
=
MaterialTheme
.
button
.
shadowDepth
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
button
.
shadowColor
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
button
.
shadowColor
// shape
// shape
...
...
Source/MaterialView.swift
View file @
3c9a67d4
...
@@ -190,11 +190,11 @@ public class MaterialView: UIView {
...
@@ -190,11 +190,11 @@ public class MaterialView: UIView {
}
}
/**
/**
:name: shadow
:name: shadow
Depth
*/
*/
public
var
shadow
:
MaterialShadow
!
{
public
var
shadow
Depth
:
MaterialShadow
!
{
didSet
{
didSet
{
let
value
:
MaterialShadowType
=
MaterialShadowToValue
(
shadow
)
let
value
:
MaterialShadowType
=
MaterialShadowToValue
(
shadow
Depth
)
shadowOffset
=
value
.
offset
shadowOffset
=
value
.
offset
shadowOpacity
=
value
.
opacity
shadowOpacity
=
value
.
opacity
shadowRadius
=
value
.
radius
shadowRadius
=
value
.
radius
...
@@ -260,7 +260,7 @@ public class MaterialView: UIView {
...
@@ -260,7 +260,7 @@ public class MaterialView: UIView {
contentsCenter
=
MaterialTheme
.
view
.
contentsCenter
contentsCenter
=
MaterialTheme
.
view
.
contentsCenter
contentsScale
=
MaterialTheme
.
view
.
contentsScale
contentsScale
=
MaterialTheme
.
view
.
contentsScale
contentsGravity
=
MaterialTheme
.
view
.
contentsGravity
contentsGravity
=
MaterialTheme
.
view
.
contentsGravity
shadow
=
MaterialTheme
.
view
.
shadow
shadow
Depth
=
MaterialTheme
.
view
.
shadowDepth
shadowColor
=
MaterialTheme
.
view
.
shadowColor
shadowColor
=
MaterialTheme
.
view
.
shadowColor
zPosition
=
MaterialTheme
.
view
.
zPosition
zPosition
=
MaterialTheme
.
view
.
zPosition
masksToBounds
=
MaterialTheme
.
view
.
masksToBounds
masksToBounds
=
MaterialTheme
.
view
.
masksToBounds
...
...
Source/NavigationBarView.swift
View file @
3c9a67d4
...
@@ -54,7 +54,7 @@ public class NavigationBarView: MaterialView {
...
@@ -54,7 +54,7 @@ public class NavigationBarView: MaterialView {
contentsCenter
=
MaterialTheme
.
navigation
.
contentsCenter
contentsCenter
=
MaterialTheme
.
navigation
.
contentsCenter
contentsScale
=
MaterialTheme
.
navigation
.
contentsScale
contentsScale
=
MaterialTheme
.
navigation
.
contentsScale
contentsGravity
=
MaterialTheme
.
navigation
.
contentsGravity
contentsGravity
=
MaterialTheme
.
navigation
.
contentsGravity
shadow
=
MaterialTheme
.
navigation
.
shadow
shadow
Depth
=
MaterialTheme
.
navigation
.
shadowDepth
shadowColor
=
MaterialTheme
.
navigation
.
shadowColor
shadowColor
=
MaterialTheme
.
navigation
.
shadowColor
zPosition
=
MaterialTheme
.
navigation
.
zPosition
zPosition
=
MaterialTheme
.
navigation
.
zPosition
masksToBounds
=
MaterialTheme
.
navigation
.
masksToBounds
masksToBounds
=
MaterialTheme
.
navigation
.
masksToBounds
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment