Touch: Cleanup UI

This commit is contained in:
Thomas Perl 2014-03-14 21:57:51 +01:00
parent 0fafc27145
commit 7e7bfbe69e
6 changed files with 24 additions and 63 deletions

View file

@ -81,6 +81,11 @@ SlidePage {
title: episodesPage.title title: episodesPage.title
model: GPodderEpisodeListModel { id: episodeListModel } model: GPodderEpisodeListModel { id: episodeListModel }
PPlaceholder {
text: 'No episodes'
visible: episodeList.count === 0
}
delegate: EpisodeItem { } delegate: EpisodeItem { }
} }
} }

View file

@ -2,7 +2,7 @@
/** /**
* *
* gPodder QML UI Reference Implementation * gPodder QML UI Reference Implementation
* Copyright (c) 2013, Thomas Perl <m@thp.io> * Copyright (c) 2014, Thomas Perl <m@thp.io>
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@ -20,12 +20,11 @@
import QtQuick 2.0 import QtQuick 2.0
SlidePage { import 'common/constants.js' as Constants
SlidePageHeader { title: 'Settings' }
PLabel {
anchors.centerIn: parent PLabel {
text: 'TODO' anchors.centerIn: parent
} font.pixelSize: 40 * pgst.scalef
color: Constants.colors.text
} }

View file

@ -67,6 +67,11 @@ SlidePage {
section.property: 'section' section.property: 'section'
section.delegate: SectionHeader { text: section } section.delegate: SectionHeader { text: section }
PPlaceholder {
text: 'No podcasts'
visible: podcastList.count === 0
}
model: podcastListModel model: podcastListModel
delegate: PodcastItem { delegate: PodcastItem {

View file

@ -49,8 +49,6 @@ Rectangle {
Dragging { Dragging {
id: dragging id: dragging
stacking: stacking stacking: stacking
onPulled: console.log('have pulled it!')
} }
Rectangle { Rectangle {

View file

@ -120,7 +120,7 @@ SlidePage {
} }
StartPageButton { StartPageButton {
id: freshEpisodesPage id: freshEpisodes
enabled: freshEpisodesRepeater.count > 0 enabled: freshEpisodesRepeater.count > 0
title: py.refreshing ? 'Refreshing feeds' : 'Fresh episodes' title: py.refreshing ? 'Refreshing feeds' : 'Fresh episodes'
@ -186,8 +186,8 @@ SlidePage {
onClicked: pgst.loadPage('PlayerPage.qml'); onClicked: pgst.loadPage('PlayerPage.qml');
anchors { anchors {
left: recommendationsPane.left left: freshEpisodes.left
right: recommendationsPane.right right: freshEpisodes.right
} }
height: 100 * pgst.scalef height: 100 * pgst.scalef
@ -199,51 +199,18 @@ SlidePage {
} }
ButtonArea { ButtonArea {
onClicked: pgst.loadPage('Settings.qml'); onClicked: pgst.loadPage('Directory.qml');
anchors { anchors {
left: recommendationsPane.left left: freshEpisodes.left
right: recommendationsPane.right right: freshEpisodes.right
} }
height: 100 * pgst.scalef height: 100 * pgst.scalef
PLabel { PLabel {
anchors.centerIn: parent anchors.centerIn: parent
text: 'Settings' text: 'gpodder.net'
}
}
StartPageButton {
id: recommendationsPane
title: 'gpodder.net'
onClicked: pgst.loadPage('Directory.qml');
Row {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
margins: 40 * pgst.scalef
}
spacing: 20 * pgst.scalef
Connections {
target: py
onReadyChanged: {
if (py.ready) {
py.call('main.load_podcasts', [], function (podcasts) {
recommendationsRepeater.model = podcasts.splice(0, 4);
});
}
}
}
Repeater {
id: recommendationsRepeater
Image { source: modelData.coverart; sourceSize { width: 80 * pgst.scalef; height: 80 * pgst.scalef } }
}
} }
} }
} }

View file

@ -60,19 +60,6 @@ SlidePage {
} }
} }
ButtonArea {
id: directory
width: input.width
height: input.height
PLabel {
anchors.centerIn: parent
text: 'gpodder.net'
}
onClicked: pgst.loadPage('Directory.qml');
}
PBusyIndicator { PBusyIndicator {
id: loading id: loading
visible: false visible: false