Scale all QML elements according to the current display size
This commit is contained in:
parent
9e7a55fc20
commit
bcdf3d94f2
15 changed files with 278 additions and 109 deletions
|
|
@ -1,62 +1,58 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Item {
|
||||
RowLayout{
|
||||
id: container
|
||||
property var model
|
||||
property var spacing: 20
|
||||
Row{
|
||||
id: buttons
|
||||
anchors.centerIn: parent
|
||||
spacing: container.spacing
|
||||
property var spacing: StyleSpacings.defaultSpacing
|
||||
|
||||
RoundImageButton{
|
||||
id: previous
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
RoundImageButton{
|
||||
id: previous
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
diameter: 60
|
||||
imageSource: "qrc:/icon_previous"
|
||||
diameter: StyleSizes.smallPlayerButtonSize //60
|
||||
imageSource: "qrc:/icon_previous"
|
||||
|
||||
enabled: model.pHasPrevious
|
||||
enabled: model.pHasPrevious
|
||||
|
||||
onClicked:{
|
||||
model.playPrevious();
|
||||
}
|
||||
onClicked:{
|
||||
model.playPrevious();
|
||||
}
|
||||
RoundImageButton{
|
||||
id: playPause
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
diameter: 80
|
||||
imageSource: model.pIsPlaying ? "qrc:/icon_pause" : "qrc:/icon_play"
|
||||
}
|
||||
RoundImageButton{
|
||||
id: playPause
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
diameter: StyleSizes.largePlayerButtonSize
|
||||
imageSource: model.pIsPlaying ? "qrc:/icon_pause" : "qrc:/icon_play"
|
||||
|
||||
onClicked:{
|
||||
model.playPause();
|
||||
}
|
||||
onClicked:{
|
||||
model.playPause();
|
||||
}
|
||||
RoundImageButton{
|
||||
id: stop
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
RoundImageButton{
|
||||
id: stop
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
diameter: 60
|
||||
imageSource: "qrc:/icon_stop"
|
||||
diameter: StyleSizes.smallPlayerButtonSize
|
||||
imageSource: "qrc:/icon_stop"
|
||||
|
||||
enabled: model.pIsPlaying
|
||||
enabled: model.pIsPlaying
|
||||
|
||||
onClicked:{
|
||||
model.stopMusic();
|
||||
}
|
||||
onClicked:{
|
||||
model.stopMusic();
|
||||
}
|
||||
RoundImageButton{
|
||||
id: next
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
RoundImageButton{
|
||||
id: next
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
diameter: 60
|
||||
imageSource: "qrc:/icon_next"
|
||||
diameter: StyleSizes.smallPlayerButtonSize
|
||||
imageSource: "qrc:/icon_next"
|
||||
|
||||
enabled: model.pHasNext
|
||||
enabled: model.pHasNext
|
||||
|
||||
onClicked:{
|
||||
model.playNext();
|
||||
}
|
||||
onClicked:{
|
||||
model.playNext();
|
||||
}
|
||||
} //Row
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue