44 lines
No EOL
1.7 KiB
Swift
44 lines
No EOL
1.7 KiB
Swift
import Gtk
|
|
|
|
extension WidgetView where Target: Gtk.Image {
|
|
/// Applies the `.icon-dropshadow` style class.
|
|
///
|
|
/// Shadow that keeps GNOME app icons legible on light backgrounds; use for icons larger than 32x32.
|
|
///
|
|
/// - Parameter enabled: Whether the style class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func iconDropshadow(_ enabled: Bool = true) -> Self {
|
|
styleClass("icon-dropshadow", enabled)
|
|
}
|
|
|
|
/// Applies the `.icon-dropshadow` style class.
|
|
///
|
|
/// Shadow that keeps GNOME app icons legible on light backgrounds; use for icons larger than 32x32.
|
|
///
|
|
/// - Parameter enabled: A binding that controls whether the class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func iconDropshadow(_ enabled: Binding<Bool>) -> Self {
|
|
styleClass("icon-dropshadow", enabled)
|
|
}
|
|
|
|
/// Applies the `.lowres-icon` style class.
|
|
///
|
|
/// Shadow that keeps GNOME app icons legible; use for icons 32x32 and smaller.
|
|
///
|
|
/// - Parameter enabled: Whether the style class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func lowresIcon(_ enabled: Bool = true) -> Self {
|
|
styleClass("lowres-icon", enabled)
|
|
}
|
|
|
|
/// Applies the `.lowres-icon` style class.
|
|
///
|
|
/// Shadow that keeps GNOME app icons legible; use for icons 32x32 and smaller.
|
|
///
|
|
/// - Parameter enabled: A binding that controls whether the class is applied.
|
|
/// - Returns: A copy of this view with the modifier applied.
|
|
public func lowresIcon(_ enabled: Binding<Bool>) -> Self {
|
|
styleClass("lowres-icon", enabled)
|
|
}
|
|
|
|
} |