diff --git a/common/GPodderEpisodeListModel.qml b/common/GPodderEpisodeListModel.qml index 33535b6..f8e632f 100644 --- a/common/GPodderEpisodeListModel.qml +++ b/common/GPodderEpisodeListModel.qml @@ -62,6 +62,10 @@ ListModel { }); } + onPodcast_idChanged: { + reload(); + } + property var worker: ModelWorkerScript { id: modelWorker } diff --git a/touch/Dragging.qml b/touch/Dragging.qml index ed9f72d..4225681 100644 --- a/touch/Dragging.qml +++ b/touch/Dragging.qml @@ -31,8 +31,8 @@ MouseArea { drag { target: parent axis: Drag.XAxis - minimumX: 0 - maximumX: canClose ? parent.width : 0 + minimumX: parent.leftDragLimit + maximumX: canClose ? pgst.width : 0 filterChildren: true } @@ -44,7 +44,7 @@ MouseArea { if (pressed) { dragging.stacking.stopAllAnimations(); } else { - if (parent.x > parent.width / 3) { + if (parent.x > pgst.width * 3 / 4) { dragging.stacking.startFadeOut(); } else { dragging.stacking.fadeInAgain(); diff --git a/touch/EpisodeDetail.qml b/touch/EpisodeDetail.qml index 536ed23..2b5a0f9 100644 --- a/touch/EpisodeDetail.qml +++ b/touch/EpisodeDetail.qml @@ -27,6 +27,8 @@ import 'icons/icons.js' as Icons SlidePage { id: detailPage + width: pgst.width / 3 + property int episode_id property string title property string link @@ -43,7 +45,7 @@ SlidePage { visible: !detailPage.ready } - Component.onCompleted: { + onEpisode_idChanged: { py.call('main.show_episode', [episode_id], function (episode) { detailPage.title = episode.title; descriptionLabel.text = episode.description; diff --git a/touch/EpisodeListView.qml b/touch/EpisodeListView.qml index 4fd0088..3430ac9 100644 --- a/touch/EpisodeListView.qml +++ b/touch/EpisodeListView.qml @@ -27,9 +27,14 @@ import 'common/util.js' as Util PListView { id: episodeList + property alias podcast_id: episodeListModel.podcast_id property int selectedIndex: -1 + onPodcast_idChanged: { + selectedIndex = -1; + } + PScrollIntoView { id: scrollIntoView } onSelectedIndexChanged: { diff --git a/touch/EpisodesPage.qml b/touch/EpisodesPage.qml index dc046c2..a4ca5b9 100644 --- a/touch/EpisodesPage.qml +++ b/touch/EpisodesPage.qml @@ -28,6 +28,8 @@ import 'icons/icons.js' as Icons SlidePage { id: page + width: pgst.width / 3 + property int podcast_id property string title @@ -80,12 +82,6 @@ SlidePage { ], undefined, undefined, true); } - - Component.onCompleted: { - episodeList.model.podcast_id = podcast_id; - // List model will be loaded automatically on load - } - EpisodeQueryControl { id: queryControl model: episodeList.model @@ -95,5 +91,6 @@ SlidePage { EpisodeListView { id: episodeList title: page.title + podcast_id: page.podcast_id } } diff --git a/touch/Main.qml b/touch/Main.qml index 28c89f7..c55ebea 100644 --- a/touch/Main.qml +++ b/touch/Main.qml @@ -68,7 +68,7 @@ Item { // Initial focus focus: true - property real scalef: (width < height) ? (width / 480) : (height / 480) + property real scalef: 1.0 //(width < height) ? (width / 480) : (height / 480) property int shorterSide: (width < height) ? width : height property int dialogsVisible: 0 @@ -84,9 +84,9 @@ Item { } if (page.isDialog) { - children[index-1].opacity = 1; + //children[index-1].opacity = 1; } else { - children[index-1].opacity = x / width; + //children[index-1].opacity = x / width; } //children[index-1].pushPhase = x / width; @@ -115,6 +115,26 @@ Item { } } + onChildrenChanged: resizePages() + + function resizePages() { + var pages = []; + for (var i=0; i