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
18dcbf6c
Commit
18dcbf6c
authored
Jul 23, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed DeviceType and updated default colors for Switch
parent
7e87e2ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
Sources/iOS/Device.swift
+2
-9
Sources/iOS/Switch.swift
+2
-2
No files found.
Sources/iOS/Device.swift
View file @
18dcbf6c
...
...
@@ -30,13 +30,6 @@
import
UIKit
public
enum
DeviceType
{
case
pad
case
phone
case
TV
case
unspecified
}
public
struct
Device
{
/// Gets the model name for the device.
public
static
var
model
:
String
{
...
...
@@ -80,8 +73,8 @@ public struct Device {
default
:
return
identifier
}
}
/// Retrieves the current device type.
/// Retrieves the current device type.
public
static
var
userInterfaceIdiom
:
UIUserInterfaceIdiom
{
return
UIDevice
.
current
()
.
userInterfaceIdiom
}
...
...
Sources/iOS/Switch.swift
View file @
18dcbf6c
...
...
@@ -192,7 +192,7 @@ public class Switch: UIControl {
buttonOnColor
=
Color
.
blue
.
darken2
trackOnColor
=
Color
.
blue
.
lighten3
buttonOffColor
=
Color
.
blueGrey
.
lighten4
trackOffColor
=
Color
.
blueG
rey
.
lighten3
trackOffColor
=
Color
.
g
rey
.
lighten3
buttonOnDisabledColor
=
Color
.
grey
.
lighten2
trackOnDisabledColor
=
Color
.
grey
.
lighten3
buttonOffDisabledColor
=
Color
.
grey
.
lighten2
...
...
@@ -200,7 +200,7 @@ public class Switch: UIControl {
case
.
dark
:
buttonOnColor
=
Color
.
blue
.
lighten1
trackOnColor
=
Color
.
blue
.
lighten2
.
withAlphaComponent
(
0.5
)
buttonOffColor
=
Color
.
blueG
rey
.
lighten3
buttonOffColor
=
Color
.
g
rey
.
lighten3
trackOffColor
=
Color
.
blueGrey
.
lighten4
.
withAlphaComponent
(
0.5
)
buttonOnDisabledColor
=
Color
.
grey
.
darken3
trackOnDisabledColor
=
Color
.
grey
.
lighten1
.
withAlphaComponent
(
0.2
)
...
...
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