mirror of https://github.com/Nheko-Reborn/nheko
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
813 B
38 lines
813 B
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 + "?" + colors.windowText
|
|
}
|
|
|
|
Label {
|
|
text: errorString
|
|
color: colors.windowText
|
|
}
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
color: colors.window
|
|
border.color: colors.windowText
|
|
}
|
|
|
|
}
|
|
|