Various layout and UI fixes

This commit is contained in:
Thomas Perl 2014-11-22 18:04:30 +01:00
parent 9610c51c30
commit b0c7071c56
2 changed files with 15 additions and 13 deletions

View file

@ -23,12 +23,12 @@ import QtQuick 2.0
import 'common'
SlidePage {
id: directory
id: page
property string provider
property bool can_search
Component.onCompleted: {
if (!directory.can_search) {
if (!page.can_search) {
// Load static data
search('');
}
@ -49,7 +49,7 @@ SlidePage {
PScrollDecorator { flickable: listView }
model: GPodderDirectorySearchModel { id: directorySearchModel; provider: directory.provider }
model: GPodderDirectorySearchModel { id: directorySearchModel; provider: page.provider }
header: Column {
anchors {
@ -57,10 +57,10 @@ SlidePage {
right: parent.right
}
SlidePageHeader { title: directory.provider }
SlidePageHeader { title: page.provider }
Column {
visible: directory.can_search
visible: page.can_search
spacing: 0.5 * 30 * pgst.scalef
@ -74,7 +74,7 @@ SlidePage {
id: input
width: parent.width
placeholderText: 'Search term'
onAccepted: directory.search(input.text);
onAccepted: page.search(input.text);
}
ButtonArea {
@ -87,7 +87,7 @@ SlidePage {
text: 'Search'
}
onClicked: directory.search(input.text);
onClicked: page.search(input.text);
}
}
}
@ -95,7 +95,7 @@ SlidePage {
delegate: DirectoryItem {
onClicked: {
py.call('main.subscribe', [url], function () {
directory.closePage();
page.closePage();
});
}
}

View file

@ -24,11 +24,8 @@ import 'common/util.js' as Util
import 'common/constants.js' as Constants
import 'icons/icons.js' as Icons
Dialog {
id: playerPage
contentHeight: flickable.contentHeight
fullWidth: true
SlidePage {
id: page
Flickable {
id: flickable
@ -51,6 +48,11 @@ Dialog {
margins: 30 * pgst.scalef
}
SlidePageHeader {
title: 'Now playing'
width: parent.width
}
Item { width: parent.width; height: 20 * pgst.scalef }
PLabel {