2019-12-19 22:46:16 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
2019-04-29 01:01:38 +10:00
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HRowLayout {
|
2019-05-03 04:20:21 +10:00
|
|
|
property alias label: noticeLabel
|
2019-04-29 01:01:38 +10:00
|
|
|
property alias text: noticeLabel.text
|
|
|
|
property alias color: noticeLabel.color
|
|
|
|
property alias font: noticeLabel.font
|
|
|
|
property alias backgroundColor: noticeLabelBackground.color
|
|
|
|
property alias radius: noticeLabelBackground.radius
|
|
|
|
|
2020-07-12 14:25:57 +10:00
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HLabel {
|
2019-04-29 01:01:38 +10:00
|
|
|
id: noticeLabel
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2020-07-17 15:45:02 +10:00
|
|
|
wrapMode: HLabel.Wrap
|
2019-07-16 19:29:47 +10:00
|
|
|
padding: theme.spacing / 2
|
|
|
|
leftPadding: theme.spacing
|
|
|
|
rightPadding: leftPadding
|
2019-04-29 01:01:38 +10:00
|
|
|
|
2019-12-17 18:45:00 +11:00
|
|
|
opacity: width > 16 * theme.uiScale ? 1 : 0
|
2019-04-29 01:01:38 +10:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
id: noticeLabelBackground
|
2019-07-24 16:14:34 +10:00
|
|
|
color: theme.controls.box.background
|
|
|
|
radius: theme.controls.box.radius
|
2019-04-29 01:01:38 +10:00
|
|
|
}
|
2019-12-17 18:45:00 +11:00
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.preferredWidth: implicitWidth
|
|
|
|
Layout.maximumWidth: parent.width
|
2019-04-29 01:01:38 +10:00
|
|
|
}
|
|
|
|
}
|