MediaPlayer/sidepanel: slightly less thick time slider
This commit is contained in:
parent
563a151277
commit
50777ef32f
2 changed files with 10 additions and 7 deletions
|
|
@ -159,9 +159,8 @@ NBox {
|
||||||
NImageCircled {
|
NImageCircled {
|
||||||
id: trackArt
|
id: trackArt
|
||||||
visible: MediaService.trackArtUrl.toString() !== ""
|
visible: MediaService.trackArtUrl.toString() !== ""
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.marginXXS * scaling
|
anchors.margins: Style.marginXS * scaling
|
||||||
imagePath: MediaService.trackArtUrl
|
imagePath: MediaService.trackArtUrl
|
||||||
fallbackIcon: "music_note"
|
fallbackIcon: "music_note"
|
||||||
borderColor: Color.mOutline
|
borderColor: Color.mOutline
|
||||||
|
|
@ -221,7 +220,7 @@ NBox {
|
||||||
id: progressWrapper
|
id: progressWrapper
|
||||||
visible: (MediaService.currentPlayer && MediaService.trackLength > 0)
|
visible: (MediaService.currentPlayer && MediaService.trackLength > 0)
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: Math.max(Style.baseWidgetSize * 0.5 * scaling, 12 * scaling)
|
height: Style.baseWidgetSize * 0.5 * scaling
|
||||||
|
|
||||||
// Local preview while dragging
|
// Local preview while dragging
|
||||||
property real localSeekRatio: -1
|
property real localSeekRatio: -1
|
||||||
|
|
@ -267,6 +266,7 @@ NBox {
|
||||||
snapAlways: false
|
snapAlways: false
|
||||||
enabled: MediaService.trackLength > 0 && MediaService.canSeek
|
enabled: MediaService.trackLength > 0 && MediaService.canSeek
|
||||||
cutoutColor: Color.mSurface
|
cutoutColor: Color.mSurface
|
||||||
|
heightRatio: 0.65
|
||||||
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
progressWrapper.localSeekRatio = value
|
progressWrapper.localSeekRatio = value
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,16 @@ import qs.Services
|
||||||
Slider {
|
Slider {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real knobDiameter: Style.baseWidgetSize * 0.75 * scaling
|
|
||||||
readonly property real trackHeight: knobDiameter * 0.5
|
|
||||||
readonly property real cutoutExtra: Style.baseWidgetSize * 0.1 * scaling
|
|
||||||
|
|
||||||
// Optional color to cut the track beneath the knob (should match surrounding background)
|
// Optional color to cut the track beneath the knob (should match surrounding background)
|
||||||
property var cutoutColor
|
property var cutoutColor
|
||||||
property bool snapAlways: true
|
property bool snapAlways: true
|
||||||
|
property real heightRatio: 0.75
|
||||||
|
|
||||||
|
readonly property real knobDiameter: Style.baseWidgetSize * heightRatio * scaling
|
||||||
|
readonly property real trackHeight: knobDiameter * 0.5
|
||||||
|
readonly property real cutoutExtra: Style.baseWidgetSize * 0.1 * scaling
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease
|
snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease
|
||||||
implicitHeight: Math.max(trackHeight, knobDiameter)
|
implicitHeight: Math.max(trackHeight, knobDiameter)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue