swift-cross-ui
swift-cross-ui copied to clipboard
Implement basic view modifiers
trafficstars
SwiftUI has a concept called view modifiers. SwiftUI's ViewModifier protocol is for modifiers that can apply to any view, but individual views can also declare their own modifiers by creating a method of the form func modifierName(/* parameters */) -> Self which modifies the view accordingly and returns a copy.
The following view modifiers would be the most useful to have:
- [x]
padding - [x]
foreground(colour) - [ ]
background(colour) - [ ]
scale
If you think of any more, reply below.
~~The SwiftGtk package currently doesn't support CSS styling which means that the styling feature request for SwiftGtk would have to be completed first.~~ SwiftGtk now supports CSS styling and has been merged into the SwiftCrossUI repo for ease of rapid development.