mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert "QML UI: make dives outside of dive trips always visible"
This reverts commit a065b97472
.
The folding as implemented is too painfully slow and buggy on devices.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f0be2764da
commit
27a62a0210
1 changed files with 7 additions and 13 deletions
|
@ -21,8 +21,8 @@ MobileComponents.Page {
|
||||||
enabled: true
|
enabled: true
|
||||||
checked: diveListView.currentIndex === model.index
|
checked: diveListView.currentIndex === model.index
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: dive.tripMeta == activeTrip || dive.tripMeta === "--" ? diveDelegateItem.height : 0
|
height: dive.tripMeta == activeTrip ? diveDelegateItem.height : 0
|
||||||
visible: dive.tripMeta == activeTrip || dive.tripMeta === "--" ? true : false
|
visible: dive.tripMeta == activeTrip ? true : false
|
||||||
|
|
||||||
property real detailsOpacity : 0
|
property real detailsOpacity : 0
|
||||||
property int horizontalPadding: MobileComponents.Units.gridUnit / 2 - MobileComponents.Units.smallSpacing + 1
|
property int horizontalPadding: MobileComponents.Units.gridUnit / 2 - MobileComponents.Units.smallSpacing + 1
|
||||||
|
@ -113,10 +113,8 @@ MobileComponents.Page {
|
||||||
id: tripHeading
|
id: tripHeading
|
||||||
Item {
|
Item {
|
||||||
width: page.width - MobileComponents.Units.gridUnit
|
width: page.width - MobileComponents.Units.gridUnit
|
||||||
height: (section !== "--") ?
|
height: childrenRect.height + MobileComponents.Units.smallSpacing * 2 + Math.max(2, MobileComponents.Units.gridUnit / 2)
|
||||||
childrenRect.height + MobileComponents.Units.smallSpacing * 2 + Math.max(2, MobileComponents.Units.gridUnit / 2) :
|
|
||||||
Math.max(2, MobileComponents.Units.gridUnit / 2)
|
|
||||||
visible: section !== "---"
|
|
||||||
MobileComponents.Heading {
|
MobileComponents.Heading {
|
||||||
id: sectionText
|
id: sectionText
|
||||||
text: {
|
text: {
|
||||||
|
@ -139,23 +137,19 @@ MobileComponents.Page {
|
||||||
leftMargin: MobileComponents.Units.gridUnit / 2
|
leftMargin: MobileComponents.Units.gridUnit / 2
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
color: subsurfaceTheme.accentColor
|
color: textColor
|
||||||
level: 2
|
level: 2
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: sectionText
|
anchors.fill: sectionText
|
||||||
enabled: section !== "--"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (activeTrip != section)
|
activeTrip = section
|
||||||
activeTrip = section
|
|
||||||
else
|
|
||||||
activeTrip = ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: Math.max(2, MobileComponents.Units.gridUnit / 12) // we want a thicker line
|
height: Math.max(2, MobileComponents.Units.gridUnit / 12) // we want a thicker line
|
||||||
anchors {
|
anchors {
|
||||||
top: section !== "--" ? sectionText.bottom : sectionText.top
|
top: sectionText.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: MobileComponents.Units.gridUnit * -2
|
leftMargin: MobileComponents.Units.gridUnit * -2
|
||||||
rightMargin: MobileComponents.Units.gridUnit * -2
|
rightMargin: MobileComponents.Units.gridUnit * -2
|
||||||
|
|
Loading…
Add table
Reference in a new issue