Fix notification.
This commit is contained in:
parent
a7f62c13b0
commit
f0dd0a4c1d
|
@ -472,7 +472,7 @@ Rectangle {
|
|||
color: "#273338"
|
||||
}
|
||||
|
||||
ItemDelegate {
|
||||
RippleEffect {
|
||||
anchors.fill: parent
|
||||
|
||||
onClicked: errorControl.visible = false
|
||||
|
|
|
@ -298,9 +298,6 @@ Item {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
id: roomPanelInput
|
||||
|
||||
width: parent.width
|
||||
height: 48
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import Spectral 0.1
|
|||
|
||||
import "qrc:/js/md.js" as Markdown
|
||||
|
||||
Rectangle {
|
||||
Control {
|
||||
property bool isReply
|
||||
property string replyUserID
|
||||
property string replyEventID
|
||||
|
@ -23,13 +23,16 @@ Rectangle {
|
|||
property int autoCompleteBeginPosition
|
||||
property int autoCompleteEndPosition
|
||||
|
||||
color: MSettings.darkTheme ? "#303030" : "#fafafa"
|
||||
padding: 0
|
||||
|
||||
radius: height / 2
|
||||
background: Rectangle {
|
||||
color: MSettings.darkTheme ? "#303030" : "#fafafa"
|
||||
radius: 24
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: 1
|
||||
elevation: 2
|
||||
}
|
||||
}
|
||||
|
||||
Popup {
|
||||
|
@ -102,12 +105,12 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
contentItem: RowLayout {
|
||||
spacing: 0
|
||||
|
||||
ToolButton {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
id: uploadButton
|
||||
visible: !isReply
|
||||
|
||||
|
@ -135,22 +138,15 @@ Rectangle {
|
|||
onClicked: clearReply()
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 48
|
||||
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
|
||||
clip: true
|
||||
|
||||
TextArea {
|
||||
property real progress: 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
id: inputField
|
||||
|
||||
wrapMode: Text.Wrap
|
||||
placeholderText: isReply ? "Reply to " + replyUserID : "Send a Message"
|
||||
leftPadding: 16
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
selectByMouse: true
|
||||
|
@ -298,9 +294,10 @@ Rectangle {
|
|||
currentRoom.postPlainText(text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
id: emojiButton
|
||||
|
||||
contentItem: MaterialIcon {
|
||||
|
|
11
qml/main.qml
11
qml/main.qml
|
@ -55,7 +55,7 @@ ApplicationWindow {
|
|||
quitOnLastWindowClosed: !MSettings.showTray
|
||||
|
||||
onNotificationClicked: {
|
||||
roomForm.enteredRoom = spectralController.connection.room(roomId)
|
||||
roomListForm.enteredRoom = spectralController.connection.room(roomId)
|
||||
roomForm.goToEvent(eventId)
|
||||
showWindow()
|
||||
}
|
||||
|
@ -131,12 +131,15 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
spectralController.onErrorOccured.connect(function(error, detail) {
|
||||
onVisibleChanged: {
|
||||
if (visible) spectralController.onErrorOccured.connect(showError)
|
||||
else spectralController.onErrorOccured.disconnect(showError)
|
||||
}
|
||||
|
||||
function showError(error, detail) {
|
||||
loginDialog.busy = false
|
||||
loginButtonTooltip.text = error + ": " + detail
|
||||
loginButtonTooltip.open()
|
||||
})
|
||||
}
|
||||
|
||||
function doLogin() {
|
||||
|
|
Loading…
Reference in New Issue