Disable Color + Theme on Linux
They don’t really make sense, since there’s no way to use them on Linux, without linking to some form of Linux rendering framework.
This commit is contained in:
parent
1e532a6c4c
commit
df73f6d066
@ -6,6 +6,8 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
#if !os(Linux)
|
||||
|
||||
/// A representation of a color, for use with a `Theme`.
|
||||
/// Since Splash aims to be cross-platform, it uses this
|
||||
/// simplified color representation rather than `NSColor`
|
||||
@ -24,7 +26,6 @@ public struct Color {
|
||||
}
|
||||
}
|
||||
|
||||
#if !os(Linux)
|
||||
internal extension Color {
|
||||
var renderable: Renderable {
|
||||
return Renderable(
|
||||
@ -35,6 +36,7 @@ internal extension Color {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if os(iOS)
|
||||
|
@ -6,10 +6,11 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
#if !os(Linux)
|
||||
|
||||
/// A theme describes what fonts and colors to use when rendering
|
||||
/// certain output formats - such as `NSAttributedString`. A default
|
||||
/// implementation is provided that matches the "Sundell's Colors"
|
||||
/// Xcode theme, by using the `sundellsColors(withFont:)` method.
|
||||
/// certain output formats - such as `NSAttributedString`. Several
|
||||
/// default implementations are provided - see Theme+Defaults.swift.
|
||||
public struct Theme {
|
||||
/// What font to use to render the highlighted text
|
||||
public var font: Font
|
||||
@ -24,3 +25,5 @@ public struct Theme {
|
||||
self.tokenColors = tokenColors
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user