44 lines
No EOL
1.5 KiB
Swift
44 lines
No EOL
1.5 KiB
Swift
import Adw
|
|
|
|
extension WidgetView where Target: Adw.InlineViewSwitcher {
|
|
/// Applies the `.flat` style class.
|
|
///
|
|
/// Makes the group look like a series of flat buttons. Combines with ``round``.
|
|
///
|
|
/// - Parameter enabled: Whether the style class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func flat(_ enabled: Bool = true) -> Self {
|
|
styleClass("flat", enabled)
|
|
}
|
|
|
|
/// Applies the `.flat` style class.
|
|
///
|
|
/// Makes the group look like a series of flat buttons. Combines with ``round``.
|
|
///
|
|
/// - Parameter enabled: A binding that controls whether the class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func flat(_ enabled: Binding<Bool>) -> Self {
|
|
styleClass("flat", enabled)
|
|
}
|
|
|
|
/// Applies the `.round` style class.
|
|
///
|
|
/// Rounds the group and the toggles inside it. Combines with ``flat``.
|
|
///
|
|
/// - Parameter enabled: Whether the style class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func round(_ enabled: Bool = true) -> Self {
|
|
styleClass("round", enabled)
|
|
}
|
|
|
|
/// Applies the `.round` style class.
|
|
///
|
|
/// Rounds the group and the toggles inside it. Combines with ``flat``.
|
|
///
|
|
/// - Parameter enabled: A binding that controls whether the class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func round(_ enabled: Binding<Bool>) -> Self {
|
|
styleClass("round", enabled)
|
|
}
|
|
|
|
} |