moment/src/gui/Base/HTile/HTileDelegate.qml

32 lines
844 B
QML
Raw Normal View History

2019-12-19 07:46:16 -04:00
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
import ".."
HTile {
id: tile
2020-05-01 01:05:50 -04:00
topPadding:
padded ? spacing / (firstInSection ? 1 : 2) / (compact ? 2 : 1) : 0
bottomPadding:
padded ? spacing / (lastInSection ? 1 : 2) / (compact ? 2 : 1) : 0
2019-09-14 18:52:43 -04:00
onLeftClicked: {
2019-09-14 17:39:17 -04:00
view.highlightRangeMode = ListView.NoHighlightRange
view.highlightMoveDuration = 0
activated()
view.highlightRangeMode = ListView.ApplyRange
view.highlightMoveDuration = theme.animationDuration
}
signal activated()
property HListView view: ListView.view
2020-05-01 01:05:50 -04:00
readonly property bool firstInSection:
ListView.previousSection !== ListView.section
readonly property bool lastInSection:
ListView.nextSection !== ListView.section
}