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