Sort of fix broken SwipeListItem's on Android by setting an implicit height.
Also fix positioning of the health indicator rectangle (should be based off of the root SwipeListItem geometry).master
parent
2281b5a6e9
commit
077e0b82d7
|
@ -85,7 +85,7 @@ AccountEntryViewBase {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: health
|
id: health
|
||||||
x: - root.leftPadding
|
x: - root.leftPadding
|
||||||
y: Math.max(mainLayout.height, mainLayout.implicitHeight)
|
y: root.height - health.height - root.bottomPadding
|
||||||
radius: health.height
|
radius: health.height
|
||||||
height: Kirigami.Units.smallSpacing
|
height: Kirigami.Units.smallSpacing
|
||||||
opacity: timeoutIndicatorAnimation.running ? 0.6 : 0
|
opacity: timeoutIndicatorAnimation.running ? 0.6 : 0
|
||||||
|
|
|
@ -5,12 +5,23 @@
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 2.0 as Controls
|
import QtQuick.Controls 2.0 as Controls
|
||||||
|
import org.kde.kirigami 2.8 as Kirigami
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property string accountName
|
property string accountName
|
||||||
property string tokenValue
|
property string tokenValue
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
/*
|
||||||
|
* It appears that Kirigami.SwipeListItem is quite broken (at least on Android): without setting an implicitHeight here
|
||||||
|
* the SwipeListItem which will eventually contain this item is not tall enough even for its own actions!
|
||||||
|
*
|
||||||
|
* The work around is to just sort of guess at what an appropriate implicitHeight might be.
|
||||||
|
* Note that on desktop this does approximately nothing, on Android it seems to set the height to
|
||||||
|
* Kirigami.Units.iconSizes.small and that appears to be match with the icon size used for SwipeListItem actions there
|
||||||
|
* as well.
|
||||||
|
*/
|
||||||
|
implicitHeight: Math.max(accountNameLabel.height, tokenValueLabel.height, Kirigami.Units.iconSizes.small)
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: accountNameLabel
|
id: accountNameLabel
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
|
Loading…
Reference in New Issue