Skip to content

Commit

Permalink
Merge pull request #1863 from KomodoPlatform/drag_selector_invisible_…
Browse files Browse the repository at this point in the history
…light

Fix: Drag selector does not fit with the theme
  • Loading branch information
smk762 committed Jul 12, 2022
2 parents 19cdd5e + 41f2eae commit 97b8958
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 44 deletions.
4 changes: 2 additions & 2 deletions atomic_defi_design/Dex/Components/DefaultRangeSlider.qml
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
@@ -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.

0 comments on commit 97b8958

Please sign in to comment.