NSWindow

NSWindow ThemeKit extension.

  • Any window specific theme.

    This is, usually, nil, which means the current global theme will be used. Please note that when using window specific themes, only the associated NSAppearance will be automatically set. All theme aware assets (ThemeColor, ThemeGradient and ThemeImage) should call methods that returns a resolved color instead (which means they don’t change with the theme change, you need to observe theme changes manually, and set colors afterwards):

    • ThemeColor.color(for view:, selector:)
    • ThemeGradient.gradient(for view:, selector:)
    • ThemeImage.image(for view:, selector:)

    Additionaly, please note that system overriden colors (NSColor.*) will always use the global theme.

    Declaration

    Swift

    @objc public var windowTheme: Theme?
  • Returns the current effective theme (read-only).

    Declaration

    Swift

    @objc public var windowEffectiveTheme: Theme
  • Returns the current effective appearance (read-only).

    Declaration

    Swift

    @objc public var windowEffectiveThemeAppearance: NSAppearance?