moment/src/gui/Pages/Chat/InfoBar.qml

44 lines
1.0 KiB
QML
Raw Normal View History

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../../Base"
Rectangle {
implicitHeight: label.text ? rowLayout.height : 0
opacity: implicitHeight ? 1 : 0
readonly property alias icon: icon
readonly property alias label: label
2020-05-20 19:19:06 +10:00
default property alias rowLayoutData: rowLayout.data
Behavior on implicitHeight { HNumberAnimation {} }
HRowLayout {
id: rowLayout
2020-05-20 19:19:06 +10:00
width: parent.width
spacing: theme.spacing
HIcon {
id: icon
Layout.fillHeight: true
Layout.leftMargin: rowLayout.spacing / 2
}
HLabel {
id: label
elide: Text.ElideRight
Layout.fillWidth: true
Layout.fillHeight: true
Layout.topMargin: rowLayout.spacing / 4
Layout.bottomMargin: rowLayout.spacing / 4
Layout.leftMargin: rowLayout.spacing / 2
Layout.rightMargin: rowLayout.spacing / 2
}
}
}