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
4433996f
Commit
4433996f
authored
Feb 07, 2018
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue-841: potential fix for sizing issue. Needs testing.
parent
877bbc4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Sources/iOS/Switch.swift
+7
-7
No files found.
Sources/iOS/Switch.swift
View file @
4433996f
...
@@ -231,14 +231,14 @@ open class Switch: UIControl {
...
@@ -231,14 +231,14 @@ open class Switch: UIControl {
didSet
{
didSet
{
switch
switchSize
{
switch
switchSize
{
case
.
small
:
case
.
small
:
trackThickness
=
1
2
trackThickness
=
1
6
buttonDiameter
=
18
buttonDiameter
=
20
case
.
medium
:
case
.
medium
:
trackThickness
=
18
trackThickness
=
20
buttonDiameter
=
24
buttonDiameter
=
24
case
.
large
:
case
.
large
:
trackThickness
=
24
trackThickness
=
24
buttonDiameter
=
32
buttonDiameter
=
28
}
}
frame
.
size
=
intrinsicContentSize
frame
.
size
=
intrinsicContentSize
...
@@ -248,11 +248,11 @@ open class Switch: UIControl {
...
@@ -248,11 +248,11 @@ open class Switch: UIControl {
open
override
var
intrinsicContentSize
:
CGSize
{
open
override
var
intrinsicContentSize
:
CGSize
{
switch
switchSize
{
switch
switchSize
{
case
.
small
:
case
.
small
:
return
CGSize
(
width
:
24
,
height
:
2
4
)
return
CGSize
(
width
:
34
,
height
:
3
4
)
case
.
medium
:
case
.
medium
:
return
CGSize
(
width
:
3
0
,
height
:
30
)
return
CGSize
(
width
:
3
8
,
height
:
38
)
case
.
large
:
case
.
large
:
return
CGSize
(
width
:
36
,
height
:
36
)
return
CGSize
(
width
:
42
,
height
:
42
)
}
}
}
}
...
...
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