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
11f70164
Commit
11f70164
authored
Sep 29, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated defaults for frame sizing
parent
ffcb12a1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
27 deletions
+17
-27
Source/BasicCardView.swift
+8
-0
Source/MaterialPulseView.swift
+1
-1
Source/MaterialTheme.swift
+7
-25
Source/MaterialView.swift
+1
-1
No files found.
Source/BasicCardView.swift
View file @
11f70164
...
@@ -64,6 +64,10 @@ public class BasicCardView: MaterialPulseView {
...
@@ -64,6 +64,10 @@ public class BasicCardView: MaterialPulseView {
didSet
{
didSet
{
if
let
v
=
titleLabel
{
if
let
v
=
titleLabel
{
v
.
translatesAutoresizingMaskIntoConstraints
=
false
v
.
translatesAutoresizingMaskIntoConstraints
=
false
v
.
lineBreakMode
=
.
ByWordWrapping
v
.
numberOfLines
=
0
v
.
textColor
=
MaterialColor
.
white
v
.
font
=
RobotoFont
.
regularWithSize
(
18
)
}
}
reloadView
()
reloadView
()
}
}
...
@@ -95,6 +99,10 @@ public class BasicCardView: MaterialPulseView {
...
@@ -95,6 +99,10 @@ public class BasicCardView: MaterialPulseView {
didSet
{
didSet
{
if
let
v
=
detailLabel
{
if
let
v
=
detailLabel
{
v
.
translatesAutoresizingMaskIntoConstraints
=
false
v
.
translatesAutoresizingMaskIntoConstraints
=
false
v
.
lineBreakMode
=
.
ByWordWrapping
v
.
numberOfLines
=
0
v
.
textColor
=
MaterialColor
.
white
v
.
font
=
RobotoFont
.
regularWithSize
(
14
)
}
}
reloadView
()
reloadView
()
}
}
...
...
Source/MaterialPulseView.swift
View file @
11f70164
...
@@ -53,7 +53,7 @@ public class MaterialPulseView: MaterialView {
...
@@ -53,7 +53,7 @@ public class MaterialPulseView: MaterialView {
:name: init
:name: init
*/
*/
public
convenience
init
()
{
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Make
(
MaterialTheme
.
pulseView
.
x
,
MaterialTheme
.
pulseView
.
y
,
MaterialTheme
.
pulseView
.
width
,
MaterialTheme
.
pulseView
.
height
)
)
self
.
init
(
frame
:
CGRect
Zero
)
}
}
/**
/**
...
...
Source/MaterialTheme.swift
View file @
11f70164
...
@@ -31,12 +31,6 @@ public struct MaterialTheme {
...
@@ -31,12 +31,6 @@ public struct MaterialTheme {
// view
// view
public
extension
MaterialTheme
.
view
{
public
extension
MaterialTheme
.
view
{
// frame
public
static
var
x
:
CGFloat
=
0
public
static
var
y
:
CGFloat
=
0
public
static
var
width
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
width
public
static
var
height
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
height
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth0
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth0
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
...
@@ -67,12 +61,6 @@ public extension MaterialTheme.view {
...
@@ -67,12 +61,6 @@ public extension MaterialTheme.view {
// pulseView
// pulseView
public
extension
MaterialTheme
.
pulseView
{
public
extension
MaterialTheme
.
pulseView
{
// frame
public
static
var
x
:
CGFloat
=
MaterialTheme
.
view
.
x
public
static
var
y
:
CGFloat
=
MaterialTheme
.
view
.
y
public
static
var
width
:
CGFloat
=
MaterialTheme
.
view
.
width
public
static
var
height
:
CGFloat
=
MaterialTheme
.
view
.
height
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
MaterialTheme
.
view
.
shadowDepth
public
static
var
shadowDepth
:
MaterialDepth
=
MaterialTheme
.
view
.
shadowDepth
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
...
@@ -105,19 +93,13 @@ public extension MaterialTheme.pulseView {
...
@@ -105,19 +93,13 @@ public extension MaterialTheme.pulseView {
// basicCardView
// basicCardView
public
extension
MaterialTheme
.
basicCardView
{
public
extension
MaterialTheme
.
basicCardView
{
// frame
public
static
var
x
:
CGFloat
=
MaterialTheme
.
view
.
x
public
static
var
y
:
CGFloat
=
MaterialTheme
.
view
.
y
public
static
var
width
:
CGFloat
=
MaterialTheme
.
view
.
width
public
static
var
height
:
CGFloat
=
MaterialTheme
.
view
.
height
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
MaterialTheme
.
view
.
shadowDepth
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
// shape
// shape
public
static
var
masksToBounds
:
Bool
=
true
public
static
var
masksToBounds
:
Bool
=
true
public
static
var
cornerRadius
:
MaterialRadius
=
MaterialTheme
.
view
.
cornerRadius
public
static
var
cornerRadius
:
MaterialRadius
=
.
Radius1
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square2
)
...
@@ -129,7 +111,7 @@ public extension MaterialTheme.basicCardView {
...
@@ -129,7 +111,7 @@ public extension MaterialTheme.basicCardView {
public
static
var
bordercolor
:
UIColor
=
MaterialTheme
.
view
.
bordercolor
public
static
var
bordercolor
:
UIColor
=
MaterialTheme
.
view
.
bordercolor
// color
// color
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
clear
public
static
var
backgroudColor
:
UIColor
=
MaterialColor
.
blueGrey
.
darken1
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
...
@@ -149,13 +131,13 @@ public extension MaterialTheme.basicCardView {
...
@@ -149,13 +131,13 @@ public extension MaterialTheme.basicCardView {
// navigationBarView
// navigationBarView
public
extension
MaterialTheme
.
navigationBarView
{
public
extension
MaterialTheme
.
navigationBarView
{
// frame
// frame
public
static
var
x
:
CGFloat
=
MaterialTheme
.
view
.
x
public
static
var
x
:
CGFloat
=
0
public
static
var
y
:
CGFloat
=
MaterialTheme
.
view
.
y
public
static
var
y
:
CGFloat
=
0
public
static
var
width
:
CGFloat
=
MaterialTheme
.
view
.
width
public
static
var
width
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
width
public
static
var
height
:
CGFloat
=
70
public
static
var
height
:
CGFloat
=
70
// shadow
// shadow
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth
1
public
static
var
shadowDepth
:
MaterialDepth
=
.
Depth
2
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
public
static
var
shadowColor
:
UIColor
=
MaterialTheme
.
view
.
shadowColor
// shape
// shape
...
...
Source/MaterialView.swift
View file @
11f70164
...
@@ -266,7 +266,7 @@ public class MaterialView: UIView {
...
@@ -266,7 +266,7 @@ public class MaterialView: UIView {
:name: init
:name: init
*/
*/
public
convenience
init
()
{
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Make
(
MaterialTheme
.
view
.
x
,
MaterialTheme
.
view
.
y
,
MaterialTheme
.
view
.
width
,
MaterialTheme
.
view
.
height
)
)
self
.
init
(
frame
:
CGRect
Zero
)
}
}
/**
/**
...
...
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