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
61144394
Commit
61144394
authored
Sep 25, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated color naming
parent
a6ae3833
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
10 deletions
+21
-10
Source/MaterialColor.swift
+0
-0
Source/MaterialTheme.swift
+2
-2
Source/MaterialView.swift
+17
-7
Source/NavigationBarView.swift
+2
-1
No files found.
Source/MaterialColor.swift
View file @
61144394
This diff is collapsed.
Click to expand it.
Source/MaterialTheme.swift
View file @
61144394
...
@@ -39,7 +39,7 @@ public extension MaterialTheme.view {
...
@@ -39,7 +39,7 @@ public extension MaterialTheme.view {
public
static
let
masksToBounds
:
Bool
=
false
public
static
let
masksToBounds
:
Bool
=
false
// color
// color
public
static
let
backgroudColor
:
UIColor
=
MaterialColor
.
white
.
color
public
static
let
backgroudColor
:
UIColor
=
MaterialColor
.
white
// interaction
// interaction
public
static
let
userInteractionEnabled
:
Bool
=
true
public
static
let
userInteractionEnabled
:
Bool
=
true
...
@@ -67,7 +67,7 @@ public extension MaterialTheme.navigation {
...
@@ -67,7 +67,7 @@ public extension MaterialTheme.navigation {
public
static
let
masksToBounds
:
Bool
=
MaterialTheme
.
view
.
masksToBounds
public
static
let
masksToBounds
:
Bool
=
MaterialTheme
.
view
.
masksToBounds
// color
// color
public
static
let
backgroudColor
:
UIColor
=
MaterialColor
.
blue
.
accent
2
public
static
let
backgroudColor
:
UIColor
=
MaterialColor
.
blue
.
accent
3
public
static
let
lightContentStatusBar
:
Bool
=
true
public
static
let
lightContentStatusBar
:
Bool
=
true
// interaction
// interaction
...
...
Source/MaterialView.swift
View file @
61144394
...
@@ -30,20 +30,20 @@ public class MaterialView: UIView {
...
@@ -30,20 +30,20 @@ public class MaterialView: UIView {
}
}
/**
/**
:name: contents
Gravity
:name: contents
Rect
*/
*/
public
var
contents
Gravity
:
MaterialGravity
!
{
public
var
contents
Rect
:
CGRect
!
{
didSet
{
didSet
{
layer
.
contents
Gravity
=
MaterialGravityToString
(
contentsGravity
)
layer
.
contents
Rect
=
contentsRect
}
}
}
}
/**
/**
:name: contents
Rect
:name: contents
Center
*/
*/
public
var
contents
Rect
:
CGRect
!
{
public
var
contents
Center
:
CGRect
!
{
didSet
{
didSet
{
layer
.
contents
Rect
=
contentsRect
layer
.
contents
Center
=
contentsCenter
}
}
}
}
...
@@ -57,6 +57,15 @@ public class MaterialView: UIView {
...
@@ -57,6 +57,15 @@ public class MaterialView: UIView {
}
}
/**
/**
:name: contentsGravity
*/
public
var
contentsGravity
:
MaterialGravity
!
{
didSet
{
layer
.
contentsGravity
=
MaterialGravityToString
(
contentsGravity
)
}
}
/**
:name: backgroundColor
:name: backgroundColor
*/
*/
public
override
var
backgroundColor
:
UIColor
?
{
public
override
var
backgroundColor
:
UIColor
?
{
...
@@ -198,9 +207,10 @@ public class MaterialView: UIView {
...
@@ -198,9 +207,10 @@ public class MaterialView: UIView {
:name: prepareLayer
:name: prepareLayer
*/
*/
internal
func
prepareLayer
()
{
internal
func
prepareLayer
()
{
contentsRect
=
MaterialTheme
.
view
.
contentsRect
contentsCenter
=
MaterialTheme
.
view
.
contentsCenter
contentsScale
=
MaterialTheme
.
view
.
contentsScale
contentsScale
=
MaterialTheme
.
view
.
contentsScale
contentsGravity
=
MaterialTheme
.
view
.
contentsGravity
contentsGravity
=
MaterialTheme
.
view
.
contentsGravity
contentsRect
=
MaterialTheme
.
view
.
contentsRect
shadowColor
=
MaterialTheme
.
view
.
shadowColor
shadowColor
=
MaterialTheme
.
view
.
shadowColor
shadowOffset
=
MaterialTheme
.
view
.
shadowOffset
shadowOffset
=
MaterialTheme
.
view
.
shadowOffset
shadowOpacity
=
MaterialTheme
.
view
.
shadowOpacity
shadowOpacity
=
MaterialTheme
.
view
.
shadowOpacity
...
...
Source/NavigationBarView.swift
View file @
61144394
...
@@ -51,9 +51,10 @@ public class NavigationBarView: MaterialView {
...
@@ -51,9 +51,10 @@ public class NavigationBarView: MaterialView {
:name: prepareLayer
:name: prepareLayer
*/
*/
internal
override
func
prepareLayer
()
{
internal
override
func
prepareLayer
()
{
contentsRect
=
MaterialTheme
.
navigation
.
contentsRect
contentsCenter
=
MaterialTheme
.
navigation
.
contentsCenter
contentsScale
=
MaterialTheme
.
navigation
.
contentsScale
contentsScale
=
MaterialTheme
.
navigation
.
contentsScale
contentsGravity
=
MaterialTheme
.
navigation
.
contentsGravity
contentsGravity
=
MaterialTheme
.
navigation
.
contentsGravity
contentsRect
=
MaterialTheme
.
navigation
.
contentsRect
shadowColor
=
MaterialTheme
.
navigation
.
shadowColor
shadowColor
=
MaterialTheme
.
navigation
.
shadowColor
shadowOffset
=
MaterialTheme
.
navigation
.
shadowOffset
shadowOffset
=
MaterialTheme
.
navigation
.
shadowOffset
shadowOpacity
=
MaterialTheme
.
navigation
.
shadowOpacity
shadowOpacity
=
MaterialTheme
.
navigation
.
shadowOpacity
...
...
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