mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
96f791daf1
See also: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ https://hynek.me/til/copyright-years/
42 lines
932 B
QML
42 lines
932 B
QML
// SPDX-FileCopyrightText: Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick 2.9
|
|
import QtQuick.Controls 2.3
|
|
import QtQuick.Layouts 1.2
|
|
import im.nheko 1.0
|
|
|
|
Popup {
|
|
property string errorString
|
|
property var image
|
|
|
|
modal: true
|
|
// 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;
|
|
|
|
}
|
|
|
|
RowLayout {
|
|
Image {
|
|
Layout.preferredWidth: 16
|
|
Layout.preferredHeight: 16
|
|
source: "image://colorimage/" + image + "?" + Nheko.colors.windowText
|
|
}
|
|
|
|
Label {
|
|
text: errorString
|
|
color: Nheko.colors.windowText
|
|
}
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
color: Nheko.colors.window
|
|
border.color: Nheko.colors.windowText
|
|
}
|
|
|
|
}
|