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 {
|
||||
id: trackArt
|
||||
visible: MediaService.trackArtUrl.toString() !== ""
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginXXS * scaling
|
||||
anchors.margins: Style.marginXS * scaling
|
||||
imagePath: MediaService.trackArtUrl
|
||||
fallbackIcon: "music_note"
|
||||
borderColor: Color.mOutline
|
||||
|
|
@ -221,7 +220,7 @@ NBox {
|
|||
id: progressWrapper
|
||||
visible: (MediaService.currentPlayer && MediaService.trackLength > 0)
|
||||
Layout.fillWidth: true
|
||||
height: Math.max(Style.baseWidgetSize * 0.5 * scaling, 12 * scaling)
|
||||
height: Style.baseWidgetSize * 0.5 * scaling
|
||||
|
||||
// Local preview while dragging
|
||||
property real localSeekRatio: -1
|
||||
|
|
@ -267,6 +266,7 @@ NBox {
|
|||
snapAlways: false
|
||||
enabled: MediaService.trackLength > 0 && MediaService.canSeek
|
||||
cutoutColor: Color.mSurface
|
||||
heightRatio: 0.65
|
||||
|
||||
onMoved: {
|
||||
progressWrapper.localSeekRatio = value
|
||||
|
|
|
|||
|
|
@ -7,13 +7,16 @@ import qs.Services
|
|||
Slider {
|
||||
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)
|
||||
property var cutoutColor
|
||||
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
|
||||
implicitHeight: Math.max(trackHeight, knobDiameter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue