Add volume control
This commit is contained in:
parent
5d5e3c6888
commit
4a83f971f3
14 changed files with 144 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Item{
|
||||
|
|
@ -6,7 +7,7 @@ Item{
|
|||
|
||||
property int margins: 20
|
||||
|
||||
RoundButton{
|
||||
RoundImageButton{
|
||||
id: backNavigation
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
|
|
@ -16,11 +17,15 @@ Item{
|
|||
}
|
||||
}
|
||||
|
||||
RoundButton{
|
||||
id: closeApp
|
||||
RoundImageButton{
|
||||
id: closeAppButton
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: container.margins
|
||||
anchors.margins: visible ? container.margins : 0
|
||||
|
||||
visible: container.height > 500
|
||||
diameter: visible ? defaultDiameter : 0
|
||||
|
||||
imageSource: "qrc:/icon_close"
|
||||
onClicked: {
|
||||
Qt.quit();
|
||||
|
|
@ -49,6 +54,24 @@ Item{
|
|||
}
|
||||
}
|
||||
|
||||
VolumeSlider{
|
||||
id: volumeSlider
|
||||
anchors{
|
||||
right: parent.right
|
||||
top: closeAppButton.bottom
|
||||
bottom: controlPannel.top
|
||||
margins: container.margins
|
||||
topMargin: closeAppButton.visible ? 2*container.margins : container.margins
|
||||
}
|
||||
from: 34 // we cannot hear anything if lower than 35%
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: musicModel.pAudioVolume
|
||||
onValueChanged: {
|
||||
console.log(musicModel.pAudioVolume, value);
|
||||
musicModel.pAudioVolume = value;
|
||||
}
|
||||
}
|
||||
PlayerControlPannel {
|
||||
id: controlPannel
|
||||
anchors.left: parent.left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue