mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Enhance appearance of room ping warning
This commit is contained in:
parent
f8285f165e
commit
9043087c80
1 changed files with 9 additions and 7 deletions
|
@ -8,7 +8,7 @@ import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
implicitHeight: warningRect.visible ? warningDisplay.implicitHeight : 0
|
implicitHeight: warningRect.visible ? warningDisplay.implicitHeight + 2 * Nheko.paddingSmall : 0
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
@ -16,7 +16,11 @@ Item {
|
||||||
id: warningRect
|
id: warningRect
|
||||||
|
|
||||||
visible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom)
|
visible: (room && room.permissions.canPingRoom() && room.input.containsAtRoom)
|
||||||
color: Nheko.colors.base
|
// 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)
|
||||||
|
border.width: 1
|
||||||
|
border.color: Nheko.theme.error
|
||||||
|
radius: 3
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
z: 3
|
z: 3
|
||||||
|
|
||||||
|
@ -24,11 +28,9 @@ Item {
|
||||||
id: warningDisplay
|
id: warningDisplay
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 10
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.margins: Nheko.paddingSmall
|
||||||
anchors.rightMargin: 10
|
color: Nheko.colors.text
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
color: Nheko.theme.red
|
|
||||||
text: qsTr("You are about to notify the whole room")
|
text: qsTr("You are about to notify the whole room")
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue