Commit 88cfdfd3 authored by kempe's avatar kempe

Changed DockedAudioPlayer layout

Changed layout of current DockedAudioPlayer to fix layout issues happenig with long current playing title
parent ded1e3ec
......@@ -23,9 +23,11 @@ DockedPanel {
property int bufferProgress: 0
property string currentTrack: ""
property real hightPadding: Theme.paddingMedium
property var stationData
height: Theme.itemSizeExtraLarge + Theme.paddingLarge
height: Theme.itemSizeExtraLarge + (hightPadding * 2)
contentHeight: height
flickableDirection: Flickable.VerticalFlick
......@@ -33,52 +35,56 @@ DockedPanel {
id: sleepTimer
}
Item {
MouseArea {
id: opener
anchors.fill: parent
}
MouseArea {
id: opener
anchors.fill: parent
Row {
id: quickControlsItem
anchors.fill: parent
spacing: Theme.paddingLarge
anchors.leftMargin: Theme.horizontalPageMargin
anchors.rightMargin: Theme.horizontalPageMargin
anchors.topMargin: hightPadding
anchors.bottomMargin: hightPadding
Image {
id: stationIcon
height: parent.height
width: parent.height
source: window.stationIcon
smooth: true
cache: true
fillMode: Image.PreserveAspectFit
sourceSize.height: height
sourceSize.width: height
}
RowLayout {
id: quickControlsItem
anchors.fill: parent
spacing: Theme.paddingLarge
anchors.margins: Theme.paddingSmall
Image {
id: stationIcon
Layout.minimumWidth: parent.height - Theme.paddingSmall
Layout.minimumHeight: parent.height - Theme.paddingSmall
source: window.stationIcon
smooth: true
cache: true
fillMode: Image.PreserveAspectFit
sourceSize.height: height
sourceSize.width: height
Column {
id: trackInfo
spacing: Theme.paddingSmall
width: parent.width - stationIcon.width
height: parent.height
StationInfoLabel {
name: stationData ? stationData.name : ""
track: currentTrack
width: parent.width
height: parent.height / 2
}
ColumnLayout {
id: trackInfo
spacing: -Theme.paddingSmall
StationInfoLabel {
name: stationData ? stationData.name : ""
track: currentTrack
Layout.fillHeight: true
Layout.fillWidth: true
}
Item {
width: parent.width
height: parent.height / 2
ProgressBar {
id: progressBar
value: bufferProgress
visible: showProgressBar
Layout.fillWidth: true
anchors.fill: parent
}
PlayerControlsForm {
......@@ -87,7 +93,7 @@ DockedPanel {
visible: !showProgressBar
isPlaying: player.isPlaying
isStared: player.isFavorite
Layout.fillWidth: true
anchors.fill: parent
}
}
}
......
import QtQuick 2.0
import QtQuick.Layouts 1.1
import Sailfish.Silica 1.0
ColumnLayout {
Column {
id: stationInfoLabel
spacing: 0
......@@ -14,9 +13,12 @@ ColumnLayout {
color: Theme.highlightColor
font.pixelSize: Theme.fontSizeSmall
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
truncationMode: TruncationMode.Fade
Layout.fillWidth: true
visible: text != ""
width: parent.width
height: parent.height / 2
}
Label {
......@@ -25,6 +27,8 @@ ColumnLayout {
font.pixelSize: Theme.fontSizeExtraSmall
horizontalAlignment: Text.AlignLeft
truncationMode: TruncationMode.Fade
Layout.fillWidth: true
width: parent.width
height: parent.height / 2
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment