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 { ListItem {
id: directoryItem id: directoryItem
contentHeight: Theme.itemSizeMedium + Theme.paddingSmall * 2 contentHeight: Theme.itemSizeMedium
height: contentHeight height: contentHeight
anchors { anchors {
@ -46,8 +46,8 @@ ListItem {
sourceSize.width: width sourceSize.width: width
sourceSize.height: height sourceSize.height: height
width: Theme.itemSizeMedium width: Theme.iconSizeMedium
height: Theme.itemSizeMedium height: Theme.iconSizeMedium
source: scaled_logo_url source: scaled_logo_url
} }

View file

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

View file

@ -118,7 +118,7 @@ ListItem {
} }
} }
contentHeight: 80 * pgst.scalef contentHeight: Theme.itemSizeSmall
anchors { anchors {
left: parent.left left: parent.left
@ -132,14 +132,20 @@ ListItem {
left: parent.left left: parent.left
right: downloadStatusIcon.left right: downloadStatusIcon.left
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
margins: 30 * pgst.scalef margins: Theme.paddingMedium
} }
truncationMode: TruncationMode.Fade truncationMode: TruncationMode.Fade
text: title text: title
// need to set opacity via color, as truncationMode overrides opacity // 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: { opacity: {
switch (downloadState) { switch (downloadState) {
@ -156,14 +162,16 @@ ListItem {
anchors { anchors {
right: parent.right right: parent.right
verticalCenter: parent.verticalCenter 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 font.bold: true
opacity: titleItem.opacity opacity: titleItem.opacity
color: titleItem.color
text: { text: {
switch (downloadState) { switch (downloadState) {
case Constants.state.normal: return ''; case Constants.state.normal: return '';

View file

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

View file

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

View file

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