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
baf5f068
Commit
baf5f068
authored
Sep 07, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated Material Card alignment interface
parent
5e2c7c1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
Source/BasicCardView.swift
+1
-2
Source/ImageCardView.swift
+1
-8
No files found.
Source/BasicCardView.swift
View file @
baf5f068
...
...
@@ -357,8 +357,7 @@ public class BasicCardView : MaterialCardView, Comparable, Equatable {
// common text
Layout
.
height
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
height
:
1.5
*
titleLabel
!.
font
.
pointSize
)
Layout
.
expandToParentVerticallyWithPad
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
top
:
titleLabelTopInset
,
bottom
:
titleLabelBottomInset
)
Layout
.
expandToParentHorizontallyWithPad
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
left
:
titleLabelLeftInset
,
right
:
titleLabelRightInset
)
Layout
.
expandToParentWithPad
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
top
:
titleLabelTopInset
,
left
:
titleLabelLeftInset
,
bottom
:
titleLabelBottomInset
,
right
:
titleLabelRightInset
)
}
// detail
...
...
Source/ImageCardView.swift
View file @
baf5f068
...
...
@@ -74,17 +74,11 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable {
*/
public
var
titleLabelVerticalInset
:
CGFloat
=
MaterialTheme
.
verticalInset
{
didSet
{
titleLabelTopInset
=
titleLabelVerticalInset
titleLabelBottomInset
=
titleLabelVerticalInset
}
}
/**
:name: titleLabelTopInset
*/
public
var
titleLabelTopInset
:
CGFloat
=
MaterialTheme
.
verticalInset
/**
:name: titleLabelBottomInset
*/
public
var
titleLabelBottomInset
:
CGFloat
=
MaterialTheme
.
verticalInset
...
...
@@ -469,8 +463,7 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable {
// common text
Layout
.
height
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
height
:
1.5
*
titleLabel
!.
font
.
pointSize
)
Layout
.
expandToParentVerticallyWithPad
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
top
:
titleLabelTopInset
,
bottom
:
titleLabelBottomInset
)
Layout
.
expandToParentHorizontallyWithPad
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
left
:
titleLabelLeftInset
,
right
:
titleLabelRightInset
)
Layout
.
expandToParentWithPad
(
titleLabelContainer
!
,
child
:
titleLabel
!
,
left
:
titleLabelLeftInset
,
bottom
:
titleLabelBottomInset
,
right
:
titleLabelRightInset
)
}
// detail
...
...
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