Port away from implicitely defined onFoo properties

This commit is contained in:
Tobias Fella
2021-07-07 22:09:36 +02:00
parent 73de1af321
commit 35aac4e362
2 changed files with 8 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ Kirigami.ScrollablePage {
Connections { Connections {
target: actionsHandler target: actionsHandler
onShowMessage: { function onShowMessage(messageType, message) {
page.header.contentItem.text = message; page.header.contentItem.text = message;
page.header.contentItem.type = messageType === ActionsHandler.Error ? Kirigami.MessageType.Error : Kirigami.MessageType.Information; page.header.contentItem.type = messageType === ActionsHandler.Error ? Kirigami.MessageType.Error : Kirigami.MessageType.Information;
page.header.contentItem.visible = true; page.header.contentItem.visible = true;

View File

@@ -288,8 +288,12 @@ Kirigami.ApplicationWindow {
Component.onCompleted: Controller.setBlur(pageStack, Config.blur && !Config.compactLayout); Component.onCompleted: Controller.setBlur(pageStack, Config.blur && !Config.compactLayout);
Connections { Connections {
target: Config target: Config
onBlurChanged: Controller.setBlur(pageStack, Config.blur && !Config.compactLayout); function onBlurChanged() {
onCompactLayoutChanged: Controller.setBlur(pageStack, Config.blur && !Config.compactLayout); Controller.setBlur(pageStack, Config.blur && !Config.compactLayout);
}
function onCompactLayoutChanged() {
Controller.setBlur(pageStack, Config.blur && !Config.compactLayout);
}
} }
color: Config.blur && !Config.compactLayout ? "transparent" : Kirigami.Theme.backgroundColor color: Config.blur && !Config.compactLayout ? "transparent" : Kirigami.Theme.backgroundColor
@@ -360,7 +364,7 @@ Kirigami.ApplicationWindow {
Connections { Connections {
target: Controller.activeConnection target: Controller.activeConnection
onDirectChatAvailable: { function onDirectChatAvailable(directChat) {
RoomManager.enterRoom(Controller.activeConnection.room(directChat.id)); RoomManager.enterRoom(Controller.activeConnection.room(directChat.id));
} }
} }