Skip to content

[Feature Request] Range slider (2 thumbs) invert track colors #76

@sabiland

Description

@sabiland

I have this scenario.

  1. One range slider (2 thumbs)
HorizontalRangeSliderStyle(
                                        track:
                                            HorizontalRangeTrack(
                                                view: Capsule().foregroundColor(
                                                    AppStatusColor.sliderAccent
                                                        .color
                                                )
                                            )
                                            .background(
                                                Capsule().foregroundColor(
                                                    AppStatusColor.sliderAccent
                                                        .color.opacity(
                                                            AppStatusOpacity
                                                                .accentBackground
                                                                .value
                                                        )
                                                )
                                            )
                                            .frame(
                                                height: Layout.sliderTrackHeight
                                            ),
                                        lowerThumb: makeThumb(
                                            for: .lower,
                                            filter: filterWrapper.filter
                                        ),
                                        upperThumb: makeThumb(
                                            for: .upper,
                                            filter: filterWrapper.filter
                                        ),
                                        lowerThumbSize: CGSize(
                                            width: Layout.sliderThumbSize,
                                            height: Layout.sliderThumbSize
                                        ),
                                        upperThumbSize: CGSize(
                                            width: Layout.sliderThumbSize,
                                            height: Layout.sliderThumbSize
                                        )
                                    )
  1. And for my 2nd Range slider I would like to invert colors

Notice that background in 1th slider has opacity. But of course if I just reverse colors for my 2nd slider, then background color has no more opacity and overlays track color. Any other way to do this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions