portico/Sources/Portico/Extensions/Window+Extras.swift

24 lines
No EOL
935 B
Swift

import Gtk
extension WidgetView where Target: Gtk.Window {
/// Applies the `.devel` style class.
///
/// Gives any Adw.HeaderBar or Gtk.HeaderBar inside the window a striped appearance; conventionally marks nightly or unstable builds.
///
/// - Parameter enabled: Whether the style class is applied.
/// - Returns: A copy of this view with the modifier applied.
public func devel(_ enabled: Bool = true) -> Self {
styleClass("devel", enabled)
}
/// Applies the `.devel` style class.
///
/// Gives any Adw.HeaderBar or Gtk.HeaderBar inside the window a striped appearance; conventionally marks nightly or unstable builds.
///
/// - Parameter enabled: A binding that controls whether the class is applied.
/// - Returns: A copy of this view with the modifier applied.
public func devel(_ enabled: Binding<Bool>) -> Self {
styleClass("devel", enabled)
}
}