moment/src/gui/Base/HTile/SubtitleLabel.qml
miruka ad937573cf Rewrite HTile and adapt components using it
Rewrite HTile in a more standard way, hopefully fixing the
mysterious segfault on some systems
2020-04-03 07:53:36 -04:00

25 lines
547 B
QML

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
import ".."
HRichLabel {
textFormat: Text.StyledText
font.pixelSize: theme.fontSize.small
verticalAlignment: Qt.AlignVCenter
elide: Text.ElideRight
color: theme.colors.dimText
visible: Layout.maximumHeight > 0
Layout.maximumHeight: ! tile.compact && text ? implicitHeight : 0
Layout.fillWidth: true
Layout.fillHeight: true
property HTile tile
Behavior on Layout.maximumHeight { HNumberAnimation {} }
}