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
8d51e73c
Commit
8d51e73c
authored
Mar 14, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated width to 56 from 58 in grid default
parent
84197934
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
Sources/ControlView.swift
+2
-3
Sources/StatusBarView.swift
+5
-6
No files found.
Sources/ControlView.swift
View file @
8d51e73c
...
@@ -156,7 +156,7 @@ public class ControlView : MaterialView {
...
@@ -156,7 +156,7 @@ public class ControlView : MaterialView {
if
let
b
:
UIButton
=
c
as?
UIButton
{
if
let
b
:
UIButton
=
c
as?
UIButton
{
b
.
contentEdgeInsets
=
UIEdgeInsetsZero
b
.
contentEdgeInsets
=
UIEdgeInsetsZero
}
}
c
.
frame
.
size
.
height
=
height
-
contentInset
.
top
-
contentInset
.
bottom
c
.
grid
.
columns
=
0
==
g
?
1
:
Int
(
ceil
(
w
/
g
))
c
.
grid
.
columns
=
0
==
g
?
1
:
Int
(
ceil
(
w
/
g
))
contentView
.
grid
.
columns
-=
c
.
grid
.
columns
contentView
.
grid
.
columns
-=
c
.
grid
.
columns
grid
.
views
?
.
append
(
c
)
grid
.
views
?
.
append
(
c
)
...
@@ -172,10 +172,9 @@ public class ControlView : MaterialView {
...
@@ -172,10 +172,9 @@ public class ControlView : MaterialView {
if
let
b
:
UIButton
=
c
as?
UIButton
{
if
let
b
:
UIButton
=
c
as?
UIButton
{
b
.
contentEdgeInsets
=
UIEdgeInsetsZero
b
.
contentEdgeInsets
=
UIEdgeInsetsZero
}
}
c
.
frame
.
size
.
height
=
height
-
contentInset
.
top
-
contentInset
.
bottom
c
.
grid
.
columns
=
0
==
g
?
1
:
Int
(
ceil
(
w
/
g
))
c
.
grid
.
columns
=
0
==
g
?
1
:
Int
(
ceil
(
w
/
g
))
contentView
.
grid
.
columns
-=
c
.
grid
.
columns
contentView
.
grid
.
columns
-=
c
.
grid
.
columns
grid
.
views
?
.
append
(
c
)
grid
.
views
?
.
append
(
c
)
}
}
}
}
...
...
Sources/StatusBarView.swift
View file @
8d51e73c
...
@@ -71,19 +71,18 @@ public class StatusBarView : ControlView {
...
@@ -71,19 +71,18 @@ public class StatusBarView : ControlView {
width
=
MaterialDevice
.
width
width
=
MaterialDevice
.
width
}
}
grid
.
axis
.
columns
=
Int
(
width
/
48
)
grid
.
axis
.
columns
=
Int
(
width
/
56
)
// We can call super now that we have a width.
super
.
layoutSubviews
()
// General alignment.
// General alignment.
if
.
iPhone
==
MaterialDevice
.
type
&&
MaterialDevice
.
landscape
{
if
.
iPhone
==
MaterialDevice
.
type
&&
MaterialDevice
.
landscape
{
grid
.
contentInset
.
top
=
8
contentInset
.
top
=
0
height
=
heightForLandscapeOrientation
height
=
heightForLandscapeOrientation
}
else
{
}
else
{
grid
.
contentInset
.
top
=
heightForStatusBar
+
8
contentInset
.
top
=
heightForStatusBar
height
=
heightForPortraitOrientation
height
=
heightForPortraitOrientation
}
}
// We can call super now that we have a width.
super
.
layoutSubviews
()
}
}
public
override
func
intrinsicContentSize
()
->
CGSize
{
public
override
func
intrinsicContentSize
()
->
CGSize
{
...
...
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