Skip to content

Commit

Permalink
Renamed dpMultiplier to dp
Browse files Browse the repository at this point in the history
  • Loading branch information
Iktwo committed Sep 19, 2014
1 parent b3a0966 commit 5a5f289
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 106 deletions.
8 changes: 4 additions & 4 deletions qml/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Page {

anchors {
fill: parent
margins: 4 * ScreenValues.dpMultiplier
margins: 4 * ScreenValues.dp
}

flickableItem.interactive: true; focus: true
Expand All @@ -45,7 +45,7 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width

spacing: 4 * ScreenValues.dpMultiplier
spacing: 4 * ScreenValues.dp

Label {
width: parent.width
Expand All @@ -59,7 +59,7 @@ Page {
}

Item {
height: ScreenValues.dpMultiplier * 8
height: ScreenValues.dp * 8
width: 1
}

Expand Down Expand Up @@ -97,7 +97,7 @@ Page {
}

Item {
height: ScreenValues.dpMultiplier * 8
height: ScreenValues.dp * 8
width: 1
}

Expand Down
22 changes: 11 additions & 11 deletions qml/FakeMainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Item {
id: songList

width: parent.width
height: (64 * ScreenValues.dpMultiplier + 1 * ScreenValues.dpMultiplier) * count
height: (64 * ScreenValues.dp + 1 * ScreenValues.dp) * count

model: fakeModel
clip: true
Expand All @@ -96,7 +96,7 @@ Item {
Rectangle {
id: messageBackground

property int margin: ScreenValues.dpMultiplier * 8
property int margin: ScreenValues.dp * 8

width: parent.width
height: Math.min(margin * 2 + (buttonDone.y + buttonDone.height) - (labelMessage.y + (labelMessage.height - labelMessage.paintedHeight)), columnMessage.height)
Expand Down Expand Up @@ -124,7 +124,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
Layout.fillWidth: true

font.pixelSize: ScreenValues.dpMultiplier * 18
font.pixelSize: ScreenValues.dp * 18
color: Theme.mainTextColor
text: qsTr("This is your playlist. The music that you add will appear here. Also when you play music the media controls will appear at the bottom.")
renderType: Text.NativeRendering
Expand All @@ -142,9 +142,9 @@ Item {

anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Done")
Layout.preferredHeight: 40 * ScreenValues.dpMultiplier
Layout.preferredWidth: 152 * ScreenValues.dpMultiplier
height: 40 * ScreenValues.dpMultiplier
Layout.preferredHeight: 40 * ScreenValues.dp
Layout.preferredWidth: 152 * ScreenValues.dp
height: 40 * ScreenValues.dp
style: FlatButtonStyle { }

onClicked: {
Expand Down Expand Up @@ -181,7 +181,7 @@ Item {
Rectangle {
id: messageBackgroundDettached

property int margin: ScreenValues.dpMultiplier * 8
property int margin: ScreenValues.dp * 8

width: parent.width
height: Math.min(margin * 2 + (buttonDoneDettached.y + buttonDoneDettached.height) - (labelMessageDettached.y + (labelMessageDettached.height - labelMessageDettached.paintedHeight)), columnMessageDettached.height)
Expand Down Expand Up @@ -209,7 +209,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
Layout.fillWidth: true

font.pixelSize: ScreenValues.dpMultiplier * 18
font.pixelSize: ScreenValues.dp * 18
color: Theme.mainTextColor
text: qsTr("This is your playlist. The music that you add will appear here. Also when you play music the media controls will appear at the bottom.")
renderType: Text.NativeRendering
Expand All @@ -227,9 +227,9 @@ Item {

anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Done")
Layout.preferredHeight: 40 * ScreenValues.dpMultiplier
Layout.preferredWidth: 152 * ScreenValues.dpMultiplier
height: 40 * ScreenValues.dpMultiplier
Layout.preferredHeight: 40 * ScreenValues.dp
Layout.preferredWidth: 152 * ScreenValues.dp
height: 40 * ScreenValues.dp
style: FlatButtonStyle { }

onClicked: {
Expand Down
28 changes: 14 additions & 14 deletions qml/FakePlaybackControls.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rectangle {
property alias song: songLabel.text

color: "#fafafa"
height: column.height + 1 * ScreenValues.dpMultiplier
height: column.height + 1 * ScreenValues.dp
width: parent.width

ColumnLayout {
Expand All @@ -33,7 +33,7 @@ Rectangle {
background: Rectangle {
color: Style.PROGRESS_BAR_BACKGROUND_LIGHT
implicitWidth: control.width
implicitHeight: 4 * ScreenValues.dpMultiplier
implicitHeight: 4 * ScreenValues.dp
}
progress: Rectangle {
color: "#0066CC"
Expand All @@ -47,7 +47,7 @@ Rectangle {
anchors {
left: parent.left
right: parent.right
margins: 1 * ScreenValues.dpMultiplier
margins: 1 * ScreenValues.dp
}

RowLayout {
Expand All @@ -60,17 +60,17 @@ Rectangle {
verticalAlignment: "AlignVCenter"
text: "02:10"
renderType: Text.NativeRendering
font.pixelSize: 12 * ScreenValues.dpMultiplier
font.pixelSize: 12 * ScreenValues.dp
}

RowLayout {
spacing: 8 * ScreenValues.dpMultiplier
spacing: 8 * ScreenValues.dp

ImageButton {
id: previousBtn

height: 48 * ScreenValues.dpMultiplier
width: 48 * ScreenValues.dpMultiplier
height: 48 * ScreenValues.dp
width: 48 * ScreenValues.dp

source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + "previous"
enabled: false
Expand All @@ -79,8 +79,8 @@ Rectangle {
ImageButton {
id: playBtn

height: 48 * ScreenValues.dpMultiplier
width: 48 * ScreenValues.dpMultiplier
height: 48 * ScreenValues.dp
width: 48 * ScreenValues.dp

source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + "pause"
enabled: false
Expand All @@ -89,8 +89,8 @@ Rectangle {
ImageButton {
id: nextBtn

height: 48 * ScreenValues.dpMultiplier
width: 48 * ScreenValues.dpMultiplier
height: 48 * ScreenValues.dp
width: 48 * ScreenValues.dp

source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + "next"
enabled: false
Expand All @@ -104,7 +104,7 @@ Rectangle {
text: "04:14"
horizontalAlignment: "AlignRight"
renderType: Text.NativeRendering
font.pixelSize: 12 * ScreenValues.dpMultiplier
font.pixelSize: 12 * ScreenValues.dp
}
}
}
Expand All @@ -115,12 +115,12 @@ Rectangle {
anchors {
left: parent.left
right: parent.right
margins: 1 * ScreenValues.dpMultiplier
margins: 1 * ScreenValues.dp
}

color: Style.TEXT_COLOR_DARK
renderType: Text.NativeRendering
font.pixelSize: 14 * ScreenValues.dpMultiplier
font.pixelSize: 14 * ScreenValues.dp
}
}
}
14 changes: 7 additions & 7 deletions qml/FakeSearchPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Page {
}

color: "#ddefefef"
height: 1 * ScreenValues.dpMultiplier
height: 1 * ScreenValues.dp
}

Rectangle {
Expand All @@ -71,7 +71,7 @@ Page {
}

color: "#ddefefef"
width: 1 * ScreenValues.dpMultiplier
width: 1 * ScreenValues.dp
height: width * 5
}

Expand All @@ -82,7 +82,7 @@ Page {
}

color: "#ddefefef"
width: 1 * ScreenValues.dpMultiplier
width: 1 * ScreenValues.dp
height: width * 5
}
}
Expand Down Expand Up @@ -116,13 +116,13 @@ Page {
Item {
id: busyFooterContainer
width: resultsList.width
height: musicStreamer.searching && resultsList.count > 0 ? 48 * ScreenValues.dpMultiplier : 0
height: musicStreamer.searching && resultsList.count > 0 ? 48 * ScreenValues.dp : 0

Connections {
target: musicStreamer
onSearchingChanged: {
if (musicStreamer.searching && resultsList.count > 0)
busyFooterContainer.height = 48 * ScreenValues.dpMultiplier
busyFooterContainer.height = 48 * ScreenValues.dp
else
busyFooterContainer.height = 0
}
Expand All @@ -132,15 +132,15 @@ Page {
target: resultsList
onCountChanged: {
if (musicStreamer.searching && resultsList.count > 0)
busyFooterContainer.height = 48 * ScreenValues.dpMultiplier
busyFooterContainer.height = 48 * ScreenValues.dp
else
busyFooterContainer.height = 0
}
}

BusyIndicator {
anchors.centerIn: parent
height: parent.height - 8 * ScreenValues.dpMultiplier
height: parent.height - 8 * ScreenValues.dp
width: height
running: parent.height > 0
style: BusyIndicatorStyle {
Expand Down
2 changes: 1 addition & 1 deletion qml/FlatButtonStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ButtonStyle {
elide: "ElideRight"
color: control.pressed ? Qt.darker(fontColor) : fontColor
text: buttonStyle.control.text
font.pixelSize: 14 * ScreenValues.dpMultiplier
font.pixelSize: 14 * ScreenValues.dp
renderType: "NativeRendering"
verticalAlignment: "AlignVCenter"
horizontalAlignment: "AlignHCenter"
Expand Down
34 changes: 17 additions & 17 deletions qml/PlaybackControls.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Rectangle {
}

color: "#fafafa"
height: column.height + 1 * ScreenValues.dpMultiplier
height: column.height + 1 * ScreenValues.dp
width: parent.width

ColumnLayout {
Expand Down Expand Up @@ -63,7 +63,7 @@ Rectangle {
background: Rectangle {
color: Style.PROGRESS_BAR_BACKGROUND_LIGHT
implicitWidth: control.width
implicitHeight: 4 * ScreenValues.dpMultiplier
implicitHeight: 4 * ScreenValues.dp
}
progress: Rectangle {
color: "#0066CC"
Expand All @@ -89,15 +89,15 @@ Rectangle {
anchors {
left: parent.left
right: parent.right
margins: 1 * ScreenValues.dpMultiplier
margins: 1 * ScreenValues.dp
}

RowLayout {
anchors.fill: parent

Item {
height: 1
Layout.preferredWidth: 4 * ScreenValues.dpMultiplier
Layout.preferredWidth: 4 * ScreenValues.dp
}

Label {
Expand All @@ -108,17 +108,17 @@ Rectangle {
verticalAlignment: "AlignVCenter"
text: formatMilliseconds(audioElement.position)
renderType: Text.NativeRendering
font.pixelSize: 12 * ScreenValues.dpMultiplier
font.pixelSize: 12 * ScreenValues.dp
}

RowLayout {
spacing: 8 * ScreenValues.dpMultiplier
spacing: 8 * ScreenValues.dp

ImageButton {
id: previousBtn

height: 48 * ScreenValues.dpMultiplier
width: 48 * ScreenValues.dpMultiplier
height: 48 * ScreenValues.dp
width: 48 * ScreenValues.dp

source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + "previous"

Expand All @@ -128,8 +128,8 @@ Rectangle {
ImageButton {
id: playBtn

height: 48 * ScreenValues.dpMultiplier
width: 48 * ScreenValues.dpMultiplier
height: 48 * ScreenValues.dp
width: 48 * ScreenValues.dp

source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + (audioElement.playbackState == Audio.PlayingState || (audioElement.status == Audio.Buffering || audioElement.status == Audio.Stalled) && audioElement.playbackState != Audio.PausedState ? "pause" : "play")

Expand All @@ -144,8 +144,8 @@ Rectangle {
ImageButton {
id: nextBtn

height: 48 * ScreenValues.dpMultiplier
width: 48 * ScreenValues.dpMultiplier
height: 48 * ScreenValues.dp
width: 48 * ScreenValues.dp

source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + "next"

Expand All @@ -160,12 +160,12 @@ Rectangle {
text: formatMilliseconds(audioElement.duration)
horizontalAlignment: "AlignRight"
renderType: Text.NativeRendering
font.pixelSize: 12 * ScreenValues.dpMultiplier
font.pixelSize: 12 * ScreenValues.dp
}

Item {
height: 1
Layout.preferredWidth: 4 * ScreenValues.dpMultiplier
Layout.preferredWidth: 4 * ScreenValues.dp
}
}
}
Expand All @@ -175,11 +175,11 @@ Rectangle {

anchors.horizontalCenter: parent.horizontalCenter

width: parent.width - (16 * ScreenValues.dpMultiplier)
Layout.preferredWidth: parent.width - (16 * ScreenValues.dpMultiplier)
width: parent.width - (16 * ScreenValues.dp)
Layout.preferredWidth: parent.width - (16 * ScreenValues.dp)
color: Style.TEXT_COLOR_DARK
renderType: Text.NativeRendering
font.pixelSize: 14 * ScreenValues.dpMultiplier
font.pixelSize: 14 * ScreenValues.dp
}
}
}
Loading

0 comments on commit 5a5f289

Please sign in to comment.