Fix paddings, items sizes and colors

This commit is contained in:
Thomas Perl 2014-05-21 17:37:42 +02:00
parent e9e7664156
commit c25457e3ad
6 changed files with 28 additions and 16 deletions

View file

@ -24,7 +24,7 @@ import Sailfish.Silica 1.0
ListItem {
id: directoryItem
contentHeight: Theme.itemSizeMedium + Theme.paddingSmall * 2
contentHeight: Theme.itemSizeMedium
height: contentHeight
anchors {
@ -46,8 +46,8 @@ ListItem {
sourceSize.width: width
sourceSize.height: height
width: Theme.itemSizeMedium
height: Theme.itemSizeMedium
width: Theme.iconSizeMedium
height: Theme.iconSizeMedium
source: scaled_logo_url
}

View file

@ -175,6 +175,9 @@ Page {
text: 'Shownotes'
color: Theme.highlightColor
// Only show if we also have a chapters list
visible: chaptersExpander.visible
anchors {
left: parent.left
leftMargin: Theme.paddingMedium

View file

@ -118,7 +118,7 @@ ListItem {
}
}
contentHeight: 80 * pgst.scalef
contentHeight: Theme.itemSizeSmall
anchors {
left: parent.left
@ -132,14 +132,20 @@ ListItem {
left: parent.left
right: downloadStatusIcon.left
verticalCenter: parent.verticalCenter
margins: 30 * pgst.scalef
margins: Theme.paddingMedium
}
truncationMode: TruncationMode.Fade
text: title
// need to set opacity via color, as truncationMode overrides opacity
color: Theme.rgba(isNew ? Theme.highlightColor : Theme.primaryColor, opacity)
color: {
if (episodeItem.highlighted) {
return Theme.highlightColor
} else {
Theme.rgba(isNew ? Theme.highlightColor : Theme.primaryColor, opacity)
}
}
opacity: {
switch (downloadState) {
@ -156,14 +162,16 @@ ListItem {
anchors {
right: parent.right
verticalCenter: parent.verticalCenter
rightMargin: (20 * pgst.scalef) * (text != '')
rightMargin: text ? Theme.paddingMedium : 0
}
font.pixelSize: episodeItem.contentHeight * 0.4
font.pixelSize: Theme.fontSizeLarge
font.bold: true
opacity: titleItem.opacity
color: titleItem.color
text: {
switch (downloadState) {
case Constants.state.normal: return '';

View file

@ -25,7 +25,7 @@ ContextMenu {
default property alias children: container.children
Item {
height: Theme.itemSizeLarge
height: Theme.itemSizeMedium
width: parent.width
Row {
id: container

View file

@ -27,8 +27,6 @@ PodcastsPage {
id: pgst
property bool ready: false
property real scalef: width / 480
property var playerPage: undefined
property var cover: CoverContainer { }

View file

@ -76,7 +76,8 @@ ListItem {
}
}
contentHeight: 100 * pgst.scalef
contentHeight: Theme.itemSizeMedium
anchors {
left: parent.left
right: parent.right
@ -88,15 +89,15 @@ ListItem {
anchors {
left: parent.left
leftMargin: 10 * pgst.scalef
leftMargin: Theme.paddingMedium
verticalCenter: parent.verticalCenter
}
sourceSize.width: width
sourceSize.height: height
width: 80 * pgst.scalef
height: 80 * pgst.scalef
width: Theme.iconSizeMedium
height: Theme.iconSizeMedium
source: coverart
}
@ -124,6 +125,7 @@ ListItem {
}
Label {
id: titleLabel
anchors {
left: cover.right
leftMargin: Theme.paddingMedium
@ -134,7 +136,7 @@ ListItem {
truncationMode: TruncationMode.Fade
text: title
color: newEpisodes ? Theme.highlightColor : Theme.primaryColor
color: (newEpisodes || podcastItem.highlighted) ? Theme.highlightColor : Theme.primaryColor
}
Label {
@ -145,6 +147,7 @@ ListItem {
verticalCenter: parent.verticalCenter
}
color: titleLabel.color
text: downloaded ? downloaded : ''
}
}