nheko/resources/qml/voip/DeviceError.qml

45 lines
1.0 KiB
QML
Raw Normal View History

2021-03-05 00:35:15 +01:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
2021-03-05 00:35:15 +01:00
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.9
2020-12-30 21:03:07 +01:00
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.2
2020-12-30 21:03:07 +01:00
import im.nheko 1.0
Popup {
property string errorString
2021-01-06 23:15:43 +01:00
property var image
2020-12-30 21:03:07 +01:00
modal: true
2021-01-18 12:43:27 +01:00
// only set the anchors on Qt 5.12 or higher
// see https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#anchors.centerIn-prop
Component.onCompleted: {
if (anchors)
anchors.centerIn = parent;
}
2020-12-30 21:03:07 +01:00
RowLayout {
Image {
Layout.preferredWidth: 16
Layout.preferredHeight: 16
2021-05-13 08:23:56 +02:00
source: "image://colorimage/" + image + "?" + Nheko.colors.windowText
2020-12-30 21:03:07 +01:00
}
Label {
text: errorString
2021-05-13 08:23:56 +02:00
color: Nheko.colors.windowText
2020-12-30 21:03:07 +01:00
}
2021-01-11 23:51:39 +01:00
2020-12-30 21:03:07 +01:00
}
2021-01-11 23:51:39 +01:00
background: Rectangle {
2021-05-13 08:23:56 +02:00
color: Nheko.colors.window
border.color: Nheko.colors.windowText
2021-01-11 23:51:39 +01:00
}
2020-12-30 21:03:07 +01:00
}