Skip to content

Commit

Permalink
#47update TTKMobile part[749678]
Browse files Browse the repository at this point in the history
  • Loading branch information
Greedysky committed Oct 9, 2016
1 parent 623ef8d commit af48875
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 33 deletions.
2 changes: 1 addition & 1 deletion TTKMobile/TTKMobile.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# * works are strictly forbiden.
# =================================================

TTKMusicPlayer = 2.4.0.0
TTKMusicPlayer = 2.4.1.0

QT += core gui xml qml quick multimedia

Expand Down
2 changes: 2 additions & 0 deletions TTKMobile/TTKMobile.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
<file alias="action_ring_normal">images/action_ring_normal.png</file>
<file alias="action_check_singer_normal">images/action_check_singer_normal.png</file>
<file alias="actionsheet_pplayer_normal">images/actionsheet_pplayer_normal.png</file>
<file alias="playing_volumn_slide_icon">images/playing_volumn_slide_icon.png</file>
<file alias="playing_volumn_slide_nosound_icon">images/playing_volumn_slide_nosound_icon.png</file>
</qresource>
<qresource prefix="/">
<file>qmls/main.qml</file>
Expand Down
Binary file added TTKMobile/images/playing_volumn_slide_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 54 additions & 32 deletions TTKMobile/qmls/TTKMusicPlayerCenterSettingPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Rectangle{
Rectangle {
width: parent.width
height: parent.height*0.7
color: "#EEEEEE"
color: "#F0F0F0"
anchors {
bottom: parent.bottom
left: parent.left
Expand Down Expand Up @@ -61,7 +61,7 @@ Rectangle{
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1
color: "black"
color: ttkTheme.alphaLv10
}

ListView {
Expand Down Expand Up @@ -137,7 +137,7 @@ Rectangle{
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1
color: "black"
color: ttkTheme.alphaLv10
}

ListView {
Expand Down Expand Up @@ -217,52 +217,74 @@ Rectangle{
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1
color: "black"
color: ttkTheme.alphaLv10
}

Slider {
id: musicTimeSlider
Rectangle {
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: ttkMusicPlayerCenterSettingPage.width - dpWidth(100)
Layout.fillWidth: true
Layout.preferredHeight: dpHeight(30)
height: 30
minimumValue: 0
value: 0
color: ttkTheme.alphaLv0

function sliderGeometry() {
return (musicTimeSlider.value - musicTimeSlider.minimumValue) /
(musicTimeSlider.maximumValue - musicTimeSlider.minimumValue);
}
RowLayout{
anchors.fill: parent

style: SliderStyle{
groove: Row {
Rectangle{
implicitWidth: musicTimeSlider.width*musicTimeSlider.sliderGeometry()
implicitHeight: dpHeight(3)
color: ttkTheme.topbar_background
TTKImageButton {
anchors {
left: parent.left
leftMargin: dpWidth(30)
}
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: dpWidth(30)
Layout.preferredHeight: dpHeight(30)
source: "qrc:/image/playing_volumn_slide_icon"
}

Rectangle{
implicitWidth: musicTimeSlider.width*(1-musicTimeSlider.sliderGeometry())
implicitHeight: dpHeight(3)
color: "gray"
Slider {
id: musicTimeSlider
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: ttkMusicPlayerCenterSettingPage.width - dpWidth(100)
Layout.preferredHeight: dpHeight(30)
height: 30
minimumValue: 0
value: 0

function sliderGeometry() {
return (musicTimeSlider.value - musicTimeSlider.minimumValue) /
(musicTimeSlider.maximumValue - musicTimeSlider.minimumValue);
}
}

handle: Rectangle{
anchors.centerIn: parent;
color: ttkTheme.topbar_background
width: dpWidth(20)
height: dpHeight(20)
radius: dpWidth(10)
style: SliderStyle{
groove: Row {
Rectangle{
implicitWidth: musicTimeSlider.width*musicTimeSlider.sliderGeometry()
implicitHeight: dpHeight(3)
color: ttkTheme.topbar_background
}

Rectangle{
implicitWidth: musicTimeSlider.width*(1-musicTimeSlider.sliderGeometry())
implicitHeight: dpHeight(3)
color: "gray"
}
}

handle: Rectangle{
anchors.centerIn: parent;
color: ttkTheme.topbar_background
width: dpWidth(20)
height: dpHeight(20)
radius: dpWidth(10)
}
}
}
}
}

Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1
color: "black"
color: ttkTheme.alphaLv10
}

Text {
Expand Down

0 comments on commit af48875

Please sign in to comment.