It's difficult to make iterative developments when there's two
nearly-identical types that need to be kept synchronized to any change.
Rust gives us traits so we should use them instead of duplicating code.
This made it easier to make styling and layout improvements to both
instances of the segmented button.
- Removes the orientation enum in favor of two separate widgets
- Implements the spacing attribute for both widgets
- Demo is updated to display spaced variants of the widgets
I think it's best to only include things in the Iced fork that can't be
done without forking Iced, and/or are expected to be merged upstream.
The theme doesn't seem to be either, so it fits more appropriately in
libcosmic.
That should make it easier to keep up with upstream, and it may help to
have all the Cosmic parts in one place.
Based on https://github.com/pop-os/iced commit ad9026e.