mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Don't show timeline behind warnings
This commit is contained in:
parent
b4f8d4947f
commit
c27407bfab
2 changed files with 7 additions and 7 deletions
|
@ -7,27 +7,27 @@ import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko 1.0
|
||||||
|
|
||||||
Item {
|
Rectangle {
|
||||||
id: warningRoot
|
id: warningRoot
|
||||||
|
|
||||||
required property string text
|
required property string text
|
||||||
required property bool isVisible
|
|
||||||
|
|
||||||
implicitHeight: isVisible ? warningDisplay.implicitHeight + 2 * Nheko.paddingSmall : 0
|
implicitHeight: visible ? warningDisplay.implicitHeight + 4 * Nheko.paddingSmall : 0
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: isVisible ? Nheko.paddingSmall : 0
|
color: Nheko.colors.window // required to hide the timeline behind this warning
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: warningRect
|
id: warningRect
|
||||||
|
|
||||||
visible: warningRoot.isVisible
|
visible: warningRoot.visible
|
||||||
// TODO: Qt.alpha() would make more sense but it wasn't working...
|
// TODO: Qt.alpha() would make more sense but it wasn't working...
|
||||||
color: Qt.rgba(Nheko.theme.error.r, Nheko.theme.error.g, Nheko.theme.error.b, 0.3)
|
color: Qt.rgba(Nheko.theme.error.r, Nheko.theme.error.g, Nheko.theme.error.b, 0.3)
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: Nheko.theme.error
|
border.color: Nheko.theme.error
|
||||||
radius: 3
|
radius: 3
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
anchors.margins: visible ? Nheko.paddingSmall : 0
|
||||||
z: 3
|
z: 3
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|
|
@ -155,12 +155,12 @@ Item {
|
||||||
|
|
||||||
MessageInputWarning {
|
MessageInputWarning {
|
||||||
text: qsTr("You are about to notify the whole room")
|
text: qsTr("You are about to notify the whole room")
|
||||||
isVisible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom)
|
visible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom)
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageInputWarning {
|
MessageInputWarning {
|
||||||
text: qsTr("The command /%1 is not recognized and will be sent as part of your message").arg(room ? room.input.currentCommand : "")
|
text: qsTr("The command /%1 is not recognized and will be sent as part of your message").arg(room ? room.input.currentCommand : "")
|
||||||
isVisible: room ? room.input.containsInvalidCommand : false
|
visible: room ? room.input.containsInvalidCommand : false
|
||||||
}
|
}
|
||||||
|
|
||||||
ReplyPopup {
|
ReplyPopup {
|
||||||
|
|
Loading…
Reference in a new issue