EpisodeDetail: Fix header for long text

This commit is contained in:
Thomas Perl 2015-02-27 22:41:19 +01:00
parent a03ede77f4
commit f7d6d6db15
2 changed files with 6 additions and 4 deletions

View file

@ -76,6 +76,7 @@ SlidePage {
spacing: Constants.layout.padding * pgst.scalef spacing: Constants.layout.padding * pgst.scalef
SlidePageHeader { SlidePageHeader {
padding: 0
title: detailPage.title title: detailPage.title
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap

View file

@ -29,11 +29,12 @@ Item {
property alias color: label.color property alias color: label.color
property alias wrapMode: label.wrapMode property alias wrapMode: label.wrapMode
property bool isOnSlidePage: (typeof(page) !== 'undefined') ? page : null property bool isOnSlidePage: (typeof(page) !== 'undefined') ? page : null
property real padding: 20
width: parent.width width: parent.width
visible: !platform.titleInToolbar || !isOnSlidePage visible: !platform.titleInToolbar || !isOnSlidePage
height: visible ? (Constants.layout.header.height * pgst.scalef) : 0 height: visible ? (2 * padding * pgst.scalef + label.height) : 0
Binding { Binding {
target: isOnSlidePage ? page : null target: isOnSlidePage ? page : null
@ -47,13 +48,13 @@ Item {
anchors { anchors {
left: parent.left left: parent.left
right: parent.right right: parent.right
rightMargin: 20 * pgst.scalef rightMargin: slidePageHeader.padding * pgst.scalef
leftMargin: 20 * pgst.scalef leftMargin: slidePageHeader.padding * pgst.scalef
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
color: Constants.colors.highlight color: Constants.colors.highlight
font.pixelSize: parent.height * .4 font.pixelSize: Constants.layout.header.height * pgst.scalef * .4
elide: Text.ElideRight elide: Text.ElideRight
} }
} }