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
2416672f
Commit
2416672f
authored
Aug 29, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue-7: updated button insets
parent
2e6af65c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletions
+4
-1
Source/BasicCard.swift
+2
-1
Source/FlatButton.swift
+1
-0
Source/RaisedButton.swift
+1
-0
No files found.
Source/BasicCard.swift
View file @
2416672f
...
@@ -41,6 +41,7 @@ public class BasicCard : MaterialCard {
...
@@ -41,6 +41,7 @@ public class BasicCard : MaterialCard {
public
var
titleLabel
:
UILabel
?
{
public
var
titleLabel
:
UILabel
?
{
didSet
{
didSet
{
titleLabel
!.
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
titleLabel
!.
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
titleLabel
!.
textColor
=
MaterialTheme
.
white
.
color
titleLabel
!.
font
=
Roboto
.
regularWithSize
(
22.0
)
titleLabel
!.
font
=
Roboto
.
regularWithSize
(
22.0
)
addSubview
(
titleLabel
!
)
addSubview
(
titleLabel
!
)
prepareCard
()
prepareCard
()
...
@@ -53,6 +54,7 @@ public class BasicCard : MaterialCard {
...
@@ -53,6 +54,7 @@ public class BasicCard : MaterialCard {
public
var
detailTextLabel
:
UILabel
?
{
public
var
detailTextLabel
:
UILabel
?
{
didSet
{
didSet
{
detailTextLabel
!.
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
detailTextLabel
!.
setTranslatesAutoresizingMaskIntoConstraints
(
false
)
detailTextLabel
!.
textColor
=
MaterialTheme
.
white
.
color
detailTextLabel
!.
font
=
Roboto
.
lightWithSize
(
16.0
)
detailTextLabel
!.
font
=
Roboto
.
lightWithSize
(
16.0
)
detailTextLabel
!.
numberOfLines
=
0
detailTextLabel
!.
numberOfLines
=
0
detailTextLabel
!.
lineBreakMode
=
.
ByWordWrapping
detailTextLabel
!.
lineBreakMode
=
.
ByWordWrapping
...
@@ -109,7 +111,6 @@ public class BasicCard : MaterialCard {
...
@@ -109,7 +111,6 @@ public class BasicCard : MaterialCard {
horizontalFormat
+=
"-(20)-[button
\(
i
)
]"
horizontalFormat
+=
"-(20)-[button
\(
i
)
]"
verticalFormat
+=
"-(20)-[button
\(
i
)
]"
verticalFormat
+=
"-(20)-[button
\(
i
)
]"
}
}
horizontalFormat
+=
"-(20)-|"
layoutConstraints
+=
Layout
.
constraint
(
horizontalFormat
,
options
:
nil
,
metrics
:
nil
,
views
:
buttonViews
)
layoutConstraints
+=
Layout
.
constraint
(
horizontalFormat
,
options
:
nil
,
metrics
:
nil
,
views
:
buttonViews
)
}
}
...
...
Source/FlatButton.swift
View file @
2416672f
...
@@ -27,6 +27,7 @@ public class FlatButton : MaterialButton {
...
@@ -27,6 +27,7 @@ public class FlatButton : MaterialButton {
setTitleColor
(
MaterialTheme
.
indigo
.
darken1
,
forState
:
.
Normal
)
setTitleColor
(
MaterialTheme
.
indigo
.
darken1
,
forState
:
.
Normal
)
pulseColor
=
MaterialTheme
.
indigo
.
darken1
pulseColor
=
MaterialTheme
.
indigo
.
darken1
backgroundColor
=
MaterialTheme
.
clear
.
color
backgroundColor
=
MaterialTheme
.
clear
.
color
contentEdgeInsets
=
UIEdgeInsetsMake
(
10
,
20
,
10
,
20
)
}
}
//
//
...
...
Source/RaisedButton.swift
View file @
2416672f
...
@@ -26,6 +26,7 @@ public class RaisedButton : MaterialButton {
...
@@ -26,6 +26,7 @@ public class RaisedButton : MaterialButton {
super
.
prepareView
()
super
.
prepareView
()
setTitleColor
(
MaterialTheme
.
white
.
color
,
forState
:
.
Normal
)
setTitleColor
(
MaterialTheme
.
white
.
color
,
forState
:
.
Normal
)
backgroundColor
=
MaterialTheme
.
indigo
.
darken1
backgroundColor
=
MaterialTheme
.
indigo
.
darken1
contentEdgeInsets
=
UIEdgeInsetsMake
(
10
,
20
,
10
,
20
)
}
}
//
//
...
...
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