Commit 8d51e73c by Daniel Dahan

updated width to 56 from 58 in grid default

parent 84197934
......@@ -156,7 +156,7 @@ public class ControlView : MaterialView {
if let b: UIButton = c as? UIButton {
b.contentEdgeInsets = UIEdgeInsetsZero
}
c.frame.size.height = height - contentInset.top - contentInset.bottom
c.grid.columns = 0 == g ? 1 : Int(ceil(w / g))
contentView.grid.columns -= c.grid.columns
grid.views?.append(c)
......@@ -172,10 +172,9 @@ public class ControlView : MaterialView {
if let b: UIButton = c as? UIButton {
b.contentEdgeInsets = UIEdgeInsetsZero
}
c.frame.size.height = height - contentInset.top - contentInset.bottom
c.grid.columns = 0 == g ? 1 : Int(ceil(w / g))
contentView.grid.columns -= c.grid.columns
grid.views?.append(c)
}
}
......
......@@ -71,19 +71,18 @@ public class StatusBarView : ControlView {
width = MaterialDevice.width
}
grid.axis.columns = Int(width / 48)
// We can call super now that we have a width.
super.layoutSubviews()
grid.axis.columns = Int(width / 56)
// General alignment.
if .iPhone == MaterialDevice.type && MaterialDevice.landscape {
grid.contentInset.top = 8
contentInset.top = 0
height = heightForLandscapeOrientation
} else {
grid.contentInset.top = heightForStatusBar + 8
contentInset.top = heightForStatusBar
height = heightForPortraitOrientation
}
// We can call super now that we have a width.
super.layoutSubviews()
}
public override func intrinsicContentSize() -> CGSize {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment