Unify and normalize the scaling factor values

This commit is contained in:
Thomas Perl 2011-02-04 17:26:32 +01:00
parent 79c08f40ab
commit 3518bad771
15 changed files with 46 additions and 28 deletions

View file

@ -25,6 +25,13 @@ Item {
}
}
function stop() {
audioPlayer.source = ''
videoPlayer.source = ''
audioPlayer.stop()
videoPlayer.stop()
}
Rectangle {
anchors.fill: episodeDetails
color: "white"

View file

@ -1,21 +1,26 @@
import Qt 4.7
ScaledImage {
import 'config.js' as Config
Image {
id: nowPlayingThrobber
property bool opened
signal clicked
source: 'artwork/nowplaying-tab.png'
ScaledImage {
height: Config.headerHeight
width: Config.switcherWidth
ScaledIcon {
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: (parent.width * .8 - width) / 2
}
rotation: (parent.opened)?-90:0
source: (parent.opened)?'icons/back_inv.png':'icons/nowplaying.png'
source: (parent.opened)?'icons/back_inv.png':'icons/play_inv.png'
Behavior on rotation { NumberAnimation { duration: 100 } }
}
@ -25,3 +30,4 @@ ScaledImage {
onPressed: nowPlayingThrobber.clicked()
}
}

View file

@ -18,10 +18,14 @@ SelectableItem {
horizontalAlignment: Text.AlignRight
}
ScaledImage {
Image {
id: cover
source: 'podcastList/cover-shadow.png'
height: podcastItem.height * .8
width: podcastItem.height * .8
smooth: true
anchors {
verticalCenter: parent.verticalCenter
left: counterText.right
@ -30,8 +34,8 @@ SelectableItem {
Image {
source: model.podcast.qcoverfile
width: parent.width * .8
height: parent.height * .8
width: parent.width * .85
height: parent.height * .85
sourceSize.width: width
sourceSize.height: height
anchors.centerIn: parent

View file

@ -0,0 +1,11 @@
import Qt 4.7
import 'config.js' as Config
Image {
width: Config.iconSize
height: Config.iconSize
smooth: true
}

View file

@ -1,11 +0,0 @@
import Qt 4.7
import 'config.js' as Config
Image {
width: sourceSize.width / Config.scale
height: sourceSize.height / Config.scale
smooth: true
}

View file

@ -1,13 +1,14 @@
var scale = 3
var scale = 2
var smallSpacing = 20 / scale
var largeSpacing = 40 / scale
var smallSpacing = 7 * scale
var largeSpacing = smallSpacing * 2
var switcherWidth = 280 / scale
var headerHeight = 220 / scale
var listItemHeight = 230 / scale
var iconSize = 104 / scale
var switcherWidth = 90 * scale
var headerHeight = 56 * scale
var fadeHeight = 80 / scale
var listItemHeight = 78 * scale
var iconSize = 36 * scale
var fadeHeight = 26 * scale

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
data/ui/qml/icons/play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -149,7 +149,6 @@ Rectangle {
id: nowPlayingThrobber
anchors.bottom: episodeDetails.top
anchors.right: parent.right
anchors.bottomMargin: -1
opacity: shouldAppear?1:0
z: 10
@ -248,7 +247,7 @@ Rectangle {
onClicked: controller.switcher()
}
ScaledImage {
ScaledIcon {
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
@ -282,7 +281,7 @@ Rectangle {
opacity: closeButtonMouseArea.pressed?.3:0
}
ScaledImage {
ScaledIcon {
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
@ -301,6 +300,7 @@ Rectangle {
} else if (episodeDetails.state == 'visible') {
episodeDetails.state = 'hidden'
} else if (main.state == 'podcasts') {
episodeDetails.stop()
controller.quit()
} else {
main.state = 'podcasts'