Skip to content

Commit

Permalink
[matkakortti] A few QML tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Jan 21, 2023
1 parent 7a7b01c commit 864d202
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions qml/hsl/HslDetailsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ SilicaFlickable {
id: passItems

property bool expanded
readonly property int rowHeight: Math.max(passItem1.implicitHeight, passItem2.implicitHeight)

x: Theme.horizontalPageMargin
width: parent.width - 2*x
height: expanded ? 2 * rowHeight : rowHeight
height: expanded ? periodPassItems.height : lastPassItem.height
clip: true

Column {
id: periodPassItems

width: parent.width

HslPeriodPassItem {
id: passItem1
id: lastPassItem

height: passItems.rowHeight
startDate: periodPass.periodStartDate1
endDate: periodPass.periodEndDate1
areaName: periodPass.validityAreaName1
Expand All @@ -76,14 +76,15 @@ SilicaFlickable {
}

HslPeriodPassItem {
id: passItem2

height: passItems.rowHeight
startDate: periodPass.periodStartDate2
endDate: periodPass.periodEndDate2
areaName: periodPass.validityAreaName2
price: periodPass.periodPrice2
daysRemaining: periodPass.periodDaysRemaining2
opacity: passItems.expanded ? 1 : 0
visible: opacity > 0

Behavior on opacity { FadeAnimation { duration: 200 } }
}
}

Expand Down

0 comments on commit 864d202

Please sign in to comment.