From 13558fd61c7e9d64a53deedaeb74d940cf9340db Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 25 Feb 2021 05:32:05 -0400 Subject: [PATCH] Popups: make key words colored instead of italic The room name in room forget/leave/invite popups, the exception type in the unexpected exception popup --- src/gui/Popups/ForgetRoomPopup.qml | 4 +++- src/gui/Popups/InviteToRoomPopup.qml | 4 +++- src/gui/Popups/LeaveRoomPopup.qml | 4 +++- src/gui/Popups/UnexpectedErrorPopup.qml | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/gui/Popups/ForgetRoomPopup.qml b/src/gui/Popups/ForgetRoomPopup.qml index 47155e26..1f085def 100644 --- a/src/gui/Popups/ForgetRoomPopup.qml +++ b/src/gui/Popups/ForgetRoomPopup.qml @@ -48,7 +48,9 @@ HFlickableColumnPopup { onClosed: if (canDestroy) Qt.callLater(popup.destroy) SummaryLabel { - text: qsTr("Leave %1 and lose the history?").arg(roomName) + text: qsTr("Leave %1 and lose the history?").arg( + utils.htmlColorize(roomName, theme.colors.accentText), + ) textFormat: Text.StyledText } diff --git a/src/gui/Popups/InviteToRoomPopup.qml b/src/gui/Popups/InviteToRoomPopup.qml index 83b8b5a9..002565d9 100644 --- a/src/gui/Popups/InviteToRoomPopup.qml +++ b/src/gui/Popups/InviteToRoomPopup.qml @@ -68,7 +68,9 @@ HColumnPopup { if (! invitingAllowed && inviteFutureId) py.cancelCoro(inviteFutureId) SummaryLabel { - text: qsTr("Invite users to %1").arg(roomName) + text: qsTr("Invite users to %1").arg( + utils.htmlColorize(roomName, theme.colors.accentText), + ) textFormat: Text.StyledText } diff --git a/src/gui/Popups/LeaveRoomPopup.qml b/src/gui/Popups/LeaveRoomPopup.qml index f1fc28dd..c1847c99 100644 --- a/src/gui/Popups/LeaveRoomPopup.qml +++ b/src/gui/Popups/LeaveRoomPopup.qml @@ -33,7 +33,9 @@ HFlickableColumnPopup { onOpened: leaveButton.forceActiveFocus() SummaryLabel { - text: qsTr("Leave %1?").arg(roomName) + text: qsTr("Leave %1?").arg( + utils.htmlColorize(roomName, theme.colors.accentText), + ) textFormat: Text.StyledText } diff --git a/src/gui/Popups/UnexpectedErrorPopup.qml b/src/gui/Popups/UnexpectedErrorPopup.qml index 23f08d32..4796419d 100644 --- a/src/gui/Popups/UnexpectedErrorPopup.qml +++ b/src/gui/Popups/UnexpectedErrorPopup.qml @@ -32,7 +32,9 @@ HColumnPopup { onOpened: cancelButton.forceActiveFocus() SummaryLabel { - text: qsTr("Unexpected error occured: %1").arg(errorType) + text: qsTr("Unexpected error occured: %1").arg( + utils.htmlColorize(errorType, theme.colors.accentText), + ) textFormat: Text.StyledText }