Skip to content

Fix: Drag selector does not fit with the theme #1863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions atomic_defi_design/Dex/Components/DefaultRangeSlider.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ RangeSlider
width: control.availableWidth
height: implicitHeight
radius: 2
color: Dex.CurrentTheme.rangeSliderDistanceColor
color: control.rangeDistanceColor

Rectangle
{
x: control.first.visualPosition * parent.width
width: control.second.visualPosition * parent.width - x
height: parent.height
color: Dex.CurrentTheme.rangeSliderBackgroundColor
color: control.rangeBackgroundColor
radius: 2
}
}
Expand Down
42 changes: 41 additions & 1 deletion atomic_defi_design/Dex/Components/DefaultSlider.qml
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
import QtQuick 2.15
import QtQuick.Controls 2.15

import "../Constants"
import App 1.0
import Dex.Themes 1.0 as Dex

Slider
{
id: control
value: 0.5
opacity: enabled ? 1 : .5

background: Rectangle
{
x: control.leftPadding
y: control.topPadding + control.availableHeight / 2 - height / 2
implicitWidth: 200
implicitHeight: 4
width: control.availableWidth
height: implicitHeight
radius: 2
color: Dex.CurrentTheme.rangeSliderDistanceColor

DexSlider {
Rectangle
{
width: control.visualPosition * parent.width
height: parent.height
color: Dex.CurrentTheme.rangeSliderBackgroundColor
radius: 2
}
}

handle: Rectangle
{
x: control.leftPadding + control.visualPosition * (control.availableWidth - width)
y: control.topPadding + control.availableHeight / 2 - height / 2
implicitWidth: 26
implicitHeight: 26
radius: 13
gradient: Gradient
{
orientation: Gradient.Horizontal
GradientStop { position: 0.125; color: Dex.CurrentTheme.rangeSliderIndicatorBackgroundStartColor }
GradientStop { position: 0.925; color: Dex.CurrentTheme.rangeSliderIndicatorBackgroundEndColor }
}
}
}
41 changes: 0 additions & 41 deletions atomic_defi_design/Dex/Components/DexSlider.qml

This file was deleted.