From 5f4efa94420d633edf08534b1fcc81410ab467b3 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 2 Feb 2020 00:27:28 +0100 Subject: [PATCH] Speed up timeline by using global ToolTip and Menu --- resources/langs/nheko_de.ts | 91 ++++++++++++++------------- resources/langs/nheko_el.ts | 81 +++++++++++++----------- resources/langs/nheko_en.ts | 81 +++++++++++++----------- resources/langs/nheko_fi.ts | 81 +++++++++++++----------- resources/langs/nheko_fr.ts | 81 +++++++++++++----------- resources/langs/nheko_nl.ts | 81 +++++++++++++----------- resources/langs/nheko_pl.ts | 81 +++++++++++++----------- resources/langs/nheko_ru.ts | 81 +++++++++++++----------- resources/langs/nheko_zh_CN.ts | 81 +++++++++++++----------- resources/qml/EncryptionIndicator.qml | 9 ++- resources/qml/MatrixText.qml | 8 +-- resources/qml/StatusIndicator.qml | 18 +++--- resources/qml/TimelineRow.qml | 61 +++++------------- resources/qml/TimelineView.qml | 45 ++++++++++--- 14 files changed, 460 insertions(+), 420 deletions(-) diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 3252679..74dfb31 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. Medienupload fehlgeschlagen. Bitte versuche es erneut. - + Failed to restore OLM account. Please login again. Wiederherstellung des OLM Accounts fehlgeschlagen. Bitte logge dich erneut ein. @@ -71,12 +71,12 @@ - + Please try to login again: %1 Bitte melde dich erneut an: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms Alle Räume @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted Verschlüsselt @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Matrix-ID @@ -235,7 +235,7 @@ MemberList - + Room members Teilnehmerliste @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Raum suchen… @@ -297,7 +297,7 @@ RegisterPage - + Username Benutzername @@ -407,7 +407,7 @@ StatusIndicator - + Failed Fehlgeschlagen @@ -430,13 +430,13 @@ TextInputWidget - + Send a file Versende Datei - + Write a message... Schreibe eine Nachricht… @@ -612,7 +612,7 @@ TimelineRow - + Reply Antworten @@ -621,44 +621,49 @@ Options Optionen + + + TimelineView - + Read receipts - Lesebestätigungen + Lesebestätigungen Mark as read - Als gelesen markieren + Als gelesen markieren View raw message - Zeige rohen Nachrichteninhalt + Zeige rohen Nachrichteninhalt Redact message - Nachricht löschen + Nachricht löschen Save as - Speichern als... + Speichern als... - - - TimelineView - + No room open Kein Raum geöffnet + + + Close + Schließen + TopRoomBar - + Room options Raumoptionen @@ -691,7 +696,7 @@ TrayIcon - + Show Zeigen @@ -704,7 +709,7 @@ UserInfoWidget - + Logout Abmelden @@ -712,7 +717,7 @@ UserSettingsPage - + Minimize to tray Ins Benachrichtigungsfeld minimieren @@ -861,7 +866,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Willkommen bei nheko! Ein Desktop-Client für das Matrix-Protokoll. @@ -884,7 +889,7 @@ descriptiveTime - + Yesterday Gestern @@ -992,7 +997,7 @@ dialogs::PreviewUploadOverlay - + Upload Hochladen @@ -1192,7 +1197,7 @@ Medien-Größe: %2 Banne den Nutzer aus diesem Raum - + Ignore messages from this user Nachrichten von diesem Nutzer ignorieren @@ -1202,12 +1207,12 @@ Medien-Größe: %2 Entferne diesen Nutzer aus dem Raum - + Start a conversation Gespräch beginnen - + Devices Geräte @@ -1215,7 +1220,7 @@ Medien-Größe: %2 emoji::Panel - + Smileys & People Smileys & Personen @@ -1341,7 +1346,7 @@ Medien-Größe: %2 popups::UserMentions - + This Room Dieser Raum diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 4344c56..8a4e4dc 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. @@ -71,12 +71,12 @@ - + Please try to login again: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Matrix ID @@ -235,7 +235,7 @@ MemberList - + Room members Μέλη @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Αναζήτηση συνομιλίας... @@ -297,7 +297,7 @@ RegisterPage - + Username Όνομα χρήστη @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file - + Write a message... Γράψε ένα μήνυμα... @@ -612,7 +612,7 @@ TimelineRow - + Reply @@ -621,8 +621,11 @@ Options + + + TimelineView - + Read receipts @@ -646,19 +649,21 @@ Save as - - - TimelineView - + No room open + + + Close + + TopRoomBar - + Room options @@ -691,7 +696,7 @@ TrayIcon - + Show Εμφάνιση @@ -704,7 +709,7 @@ UserInfoWidget - + Logout @@ -712,7 +717,7 @@ UserSettingsPage - + Minimize to tray Ελαχιστοποίηση @@ -861,7 +866,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Καλως ήρθες στο nheko! @@ -884,7 +889,7 @@ descriptiveTime - + Yesterday @@ -992,7 +997,7 @@ dialogs::PreviewUploadOverlay - + Upload Μεταφόρτωση @@ -1190,7 +1195,7 @@ Media size: %2 - + Ignore messages from this user @@ -1200,12 +1205,12 @@ Media size: %2 - + Start a conversation - + Devices @@ -1213,7 +1218,7 @@ Media size: %2 emoji::Panel - + Smileys & People Πρόσωπα @@ -1339,7 +1344,7 @@ Media size: %2 popups::UserMentions - + This Room diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index fee87ff..d43ef73 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. Failed to restore OLM account. Please login again. @@ -71,12 +71,12 @@ - + Please try to login again: %1 Please try to login again: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms All rooms @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Matrix ID @@ -235,7 +235,7 @@ MemberList - + Room members Room members @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Search for a room… @@ -297,7 +297,7 @@ RegisterPage - + Username Username @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file Send a file - + Write a message... Write a message… @@ -612,7 +612,7 @@ TimelineRow - + Reply @@ -621,8 +621,11 @@ Options + + + TimelineView - + Read receipts Read receipts @@ -646,19 +649,21 @@ Save as - - - TimelineView - + No room open + + + Close + Close + TopRoomBar - + Room options Room options @@ -691,7 +696,7 @@ TrayIcon - + Show Show @@ -704,7 +709,7 @@ UserInfoWidget - + Logout Logout @@ -712,7 +717,7 @@ UserSettingsPage - + Minimize to tray Minimize to tray @@ -861,7 +866,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Welcome to nheko! The desktop client for the Matrix protocol. @@ -884,7 +889,7 @@ descriptiveTime - + Yesterday Yesterday @@ -992,7 +997,7 @@ dialogs::PreviewUploadOverlay - + Upload Upload @@ -1194,7 +1199,7 @@ Media size: %2 Ban the user from the room - + Ignore messages from this user Ignore messages from this user @@ -1204,12 +1209,12 @@ Media size: %2 Kick the user from the room - + Start a conversation Start a conversation - + Devices Devices @@ -1217,7 +1222,7 @@ Media size: %2 emoji::Panel - + Smileys & People Smileys & People @@ -1343,7 +1348,7 @@ Media size: %2 popups::UserMentions - + This Room This Room diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index f6e2756..2f4ef85 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. OLM-tilin palauttaminen epäonnistui. Ole hyvä ja kirjaudu sisään uudelleen. @@ -71,12 +71,12 @@ - + Please try to login again: %1 Ole hyvä ja yritä kirjautua sisään uudelleen: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms Kaikki huoneet @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Matrix-tunnus @@ -235,7 +235,7 @@ MemberList - + Room members Huoneen jäsenet @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Etsi huonetta… @@ -297,7 +297,7 @@ RegisterPage - + Username Käyttäjänimi @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file Lähetä tiedosto - + Write a message... Kirjoita viesti… @@ -612,7 +612,7 @@ TimelineRow - + Reply @@ -621,8 +621,11 @@ Options + + + TimelineView - + Read receipts Lukukuittaukset @@ -646,19 +649,21 @@ Save as - - - TimelineView - + No room open + + + Close + Sulje + TopRoomBar - + Room options Huonevaihtoehdot @@ -691,7 +696,7 @@ TrayIcon - + Show Näytä @@ -704,7 +709,7 @@ UserInfoWidget - + Logout Kirjaudu ulos @@ -712,7 +717,7 @@ UserSettingsPage - + Minimize to tray Pienennä ilmoitusalueelle @@ -861,7 +866,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Tervetuloa nhekoon! Työpöytäsovellus Matrix-protokollalle. @@ -884,7 +889,7 @@ descriptiveTime - + Yesterday Eilen @@ -992,7 +997,7 @@ dialogs::PreviewUploadOverlay - + Upload Lähetä @@ -1194,7 +1199,7 @@ Median koko: %2 Anna käyttäjälle porttikielto huoneesta - + Ignore messages from this user Jätä tämän käyttäjän viestit huomiotta @@ -1204,12 +1209,12 @@ Median koko: %2 Potki käyttäjä huoneesta - + Start a conversation Aloita keskustelu - + Devices Laitteet @@ -1217,7 +1222,7 @@ Median koko: %2 emoji::Panel - + Smileys & People Hymiöt ja ihmiset @@ -1343,7 +1348,7 @@ Median koko: %2 popups::UserMentions - + This Room diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 89dd8cd..4369a87 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. @@ -71,12 +71,12 @@ - + Please try to login again: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Identifiant Matrix @@ -235,7 +235,7 @@ MemberList - + Room members Membres du salon @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Chercher un salon… @@ -297,7 +297,7 @@ RegisterPage - + Username Nom d'utilisateur @@ -408,7 +408,7 @@ StatusIndicator - + Failed @@ -431,13 +431,13 @@ TextInputWidget - + Send a file - + Write a message... Écrivez un message... @@ -613,7 +613,7 @@ TimelineRow - + Reply @@ -622,8 +622,11 @@ Options + + + TimelineView - + Read receipts Accusés de lecture @@ -647,19 +650,21 @@ Save as - - - TimelineView - + No room open + + + Close + + TopRoomBar - + Room options @@ -692,7 +697,7 @@ TrayIcon - + Show Montrer @@ -705,7 +710,7 @@ UserInfoWidget - + Logout @@ -713,7 +718,7 @@ UserSettingsPage - + Minimize to tray Réduire à la barre des tâches @@ -862,7 +867,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Bienvenue sur nheko ! Le client de bureau pour le protocole Matrix. @@ -885,7 +890,7 @@ descriptiveTime - + Yesterday @@ -993,7 +998,7 @@ dialogs::PreviewUploadOverlay - + Upload Envoyer @@ -1193,7 +1198,7 @@ Taille du média : %2 - + Ignore messages from this user @@ -1203,12 +1208,12 @@ Taille du média : %2 - + Start a conversation - + Devices @@ -1216,7 +1221,7 @@ Taille du média : %2 emoji::Panel - + Smileys & People Smileys & Personnes @@ -1342,7 +1347,7 @@ Taille du média : %2 popups::UserMentions - + This Room diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 2aa5de7..2ad46d7 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. @@ -71,12 +71,12 @@ - + Please try to login again: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Matrix-id @@ -235,7 +235,7 @@ MemberList - + Room members Kamerleden @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Zoek een kamer... @@ -297,7 +297,7 @@ RegisterPage - + Username Gebruikersnaam @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file - + Write a message... Typ een bericht... @@ -612,7 +612,7 @@ TimelineRow - + Reply @@ -621,8 +621,11 @@ Options + + + TimelineView - + Read receipts Leesbevestigingen @@ -646,19 +649,21 @@ Save as - - - TimelineView - + No room open + + + Close + + TopRoomBar - + Room options @@ -691,7 +696,7 @@ TrayIcon - + Show Tonen @@ -704,7 +709,7 @@ UserInfoWidget - + Logout @@ -712,7 +717,7 @@ UserSettingsPage - + Minimize to tray Minimaliseren naar systeemvak @@ -861,7 +866,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Welkom bij nheko! Dé computerclient voor het Matrix-protocol. @@ -884,7 +889,7 @@ descriptiveTime - + Yesterday @@ -992,7 +997,7 @@ dialogs::PreviewUploadOverlay - + Upload Uploaden @@ -1192,7 +1197,7 @@ Mediagrootte: %2 - + Ignore messages from this user @@ -1202,12 +1207,12 @@ Mediagrootte: %2 - + Start a conversation - + Devices @@ -1215,7 +1220,7 @@ Mediagrootte: %2 emoji::Panel - + Smileys & People Smileys en mensen @@ -1341,7 +1346,7 @@ Mediagrootte: %2 popups::UserMentions - + This Room diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index 88dfe2b..ff18bf6 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. Nie udało się przywrócić konta OLM. Spróbuj zalogować się ponownie. @@ -71,12 +71,12 @@ - + Please try to login again: %1 Spróbuj zalogować się ponownie: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID ID Matrixa @@ -235,7 +235,7 @@ MemberList - + Room members Członkowie pokoju @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Wyszukaj pokoju… @@ -297,7 +297,7 @@ RegisterPage - + Username Nazwa użytkownika @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file Wyślij plik - + Write a message... Napisz wiadomość… @@ -613,7 +613,7 @@ TimelineRow - + Reply @@ -622,8 +622,11 @@ Options + + + TimelineView - + Read receipts Potwierdzenia przeczytania @@ -647,19 +650,21 @@ Save as - - - TimelineView - + No room open + + + Close + + TopRoomBar - + Room options Ustawienia pokoju @@ -692,7 +697,7 @@ TrayIcon - + Show Pokaż @@ -705,7 +710,7 @@ UserInfoWidget - + Logout Wyloguj @@ -713,7 +718,7 @@ UserSettingsPage - + Minimize to tray Zminimalizuj do paska zadań @@ -862,7 +867,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Witamy w nheko! Desktopowy klient protokołu Matrix. @@ -885,7 +890,7 @@ descriptiveTime - + Yesterday @@ -993,7 +998,7 @@ dialogs::PreviewUploadOverlay - + Upload Wyślij @@ -1196,7 +1201,7 @@ Rozmiar multimediów: %2 Zablokuj użytkownika w tym pokoju - + Ignore messages from this user Ignoruj wiadomości od tego użytkownika @@ -1206,12 +1211,12 @@ Rozmiar multimediów: %2 Wyrzuć użytkownika z tego pokoju - + Start a conversation Rozpocznij rozmowę - + Devices Urządzenia @@ -1219,7 +1224,7 @@ Rozmiar multimediów: %2 emoji::Panel - + Smileys & People Twarze i ludzie @@ -1345,7 +1350,7 @@ Rozmiar multimediów: %2 popups::UserMentions - + This Room diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index 07e169f..821d589 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. Не удалось восстановить учетную запись OLM. Пожалуйста, войдите снова. @@ -71,12 +71,12 @@ - + Please try to login again: %1 Повторите попытку входа: %1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms Все комнаты @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID Идентификатор Matrix @@ -235,7 +235,7 @@ MemberList - + Room members Участники комнаты @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... Поиск комнаты... @@ -297,7 +297,7 @@ RegisterPage - + Username Имя пользователя @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file Отправить файл - + Write a message... Написать сообщение... @@ -613,7 +613,7 @@ TimelineRow - + Reply @@ -622,8 +622,11 @@ Options + + + TimelineView - + Read receipts Подтверждать прочтение @@ -647,19 +650,21 @@ Save as - - - TimelineView - + No room open + + + Close + Закрыть + TopRoomBar - + Room options Настройки комнаты @@ -692,7 +697,7 @@ TrayIcon - + Show Показать @@ -705,7 +710,7 @@ UserInfoWidget - + Logout Выйти @@ -713,7 +718,7 @@ UserSettingsPage - + Minimize to tray Сворачивать в системную панель @@ -863,7 +868,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. Добро пожаловать в nheko, клиент протокола Matrix! @@ -886,7 +891,7 @@ descriptiveTime - + Yesterday @@ -994,7 +999,7 @@ dialogs::PreviewUploadOverlay - + Upload Загрузить @@ -1195,7 +1200,7 @@ Media size: %2 Заблокировать пользователя в комнате - + Ignore messages from this user Игнорировать сообщения от этого пользователя @@ -1205,12 +1210,12 @@ Media size: %2 Выгнать пользователя из комнаты - + Start a conversation Начать разговор - + Devices Устройства @@ -1218,7 +1223,7 @@ Media size: %2 emoji::Panel - + Smileys & People @@ -1344,7 +1349,7 @@ Media size: %2 popups::UserMentions - + This Room diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index c7e42fb..4e0ce56 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -4,28 +4,28 @@ ChatPage - + Failed to invite user: %1 - + Invited user: %1 - + Failed to invite %1 to %2: %3 - + Failed to kick %1 to %2: %3 - + Kicked user: %1 @@ -35,12 +35,12 @@ - + Banned user: %1 - + Failed to unban %1 in %2: %3 @@ -50,12 +50,12 @@ - + Failed to upload media. Please try again. - + Failed to restore OLM account. Please login again. 恢复 OLM 账户失败。请重新登录。 @@ -71,12 +71,12 @@ - + Please try to login again: %1 请尝试再次登录:%1 - + Failed to join room: %1 @@ -109,7 +109,7 @@ CommunitiesListItem - + All rooms @@ -161,7 +161,7 @@ EncryptionIndicator - + Encrypted @@ -177,7 +177,7 @@ LoginPage - + Matrix ID @@ -235,7 +235,7 @@ MemberList - + Room members 聊天室成员 @@ -289,7 +289,7 @@ QuickSwitcher - + Search for a room... 寻找一个聊天室... @@ -297,7 +297,7 @@ RegisterPage - + Username 用户名 @@ -407,7 +407,7 @@ StatusIndicator - + Failed @@ -430,13 +430,13 @@ TextInputWidget - + Send a file 发送一个文件 - + Write a message... 写一条消息... @@ -611,7 +611,7 @@ TimelineRow - + Reply @@ -620,8 +620,11 @@ Options + + + TimelineView - + Read receipts 阅读回执 @@ -645,19 +648,21 @@ Save as - - - TimelineView - + No room open + + + Close + + TopRoomBar - + Room options 聊天室选项 @@ -690,7 +695,7 @@ TrayIcon - + Show 显示 @@ -703,7 +708,7 @@ UserInfoWidget - + Logout 登出 @@ -711,7 +716,7 @@ UserSettingsPage - + Minimize to tray 最小化至托盘 @@ -860,7 +865,7 @@ WelcomePage - + Welcome to nheko! The desktop client for the Matrix protocol. 欢迎使用 nheko! Matrix 协议的桌面客户端。 @@ -883,7 +888,7 @@ descriptiveTime - + Yesterday @@ -991,7 +996,7 @@ dialogs::PreviewUploadOverlay - + Upload 上传 @@ -1192,7 +1197,7 @@ Media size: %2 在这个聊天室封禁这个用户 - + Ignore messages from this user 忽略这个用户的消息 @@ -1202,12 +1207,12 @@ Media size: %2 把这个用户踢出聊天室 - + Start a conversation 开始一个聊天 - + Devices 设备 @@ -1215,7 +1220,7 @@ Media size: %2 emoji::Panel - + Smileys & People 笑脸和人 Smileys & People @@ -1349,7 +1354,7 @@ Media size: %2 popups::UserMentions - + This Room diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml index 6eb04e3..00fe2ee 100644 --- a/resources/qml/EncryptionIndicator.qml +++ b/resources/qml/EncryptionIndicator.qml @@ -7,11 +7,10 @@ Rectangle { color: "transparent" width: 16 height: 16 - ToolTip { - palette: colors - visible: ma.containsMouse && indicator.visible - text: qsTr("Encrypted") - } + + ToolTip.visible: ma.containsMouse && indicator.visible + ToolTip.text: qsTr("Encrypted") + MouseArea{ id: ma anchors.fill: parent diff --git a/resources/qml/MatrixText.qml b/resources/qml/MatrixText.qml index 46e7471..560a810 100644 --- a/resources/qml/MatrixText.qml +++ b/resources/qml/MatrixText.qml @@ -20,14 +20,12 @@ TextEdit { } MouseArea { + id: ma anchors.fill: parent onPressed: mouse.accepted = false cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor } - ToolTip { - visible: parent.hoveredLink - text: parent.hoveredLink - palette: colors - } + ToolTip.visible: hoveredLink + ToolTip.text: hoveredLink } diff --git a/resources/qml/StatusIndicator.qml b/resources/qml/StatusIndicator.qml index 3361640..ec82ed4 100644 --- a/resources/qml/StatusIndicator.qml +++ b/resources/qml/StatusIndicator.qml @@ -8,16 +8,14 @@ Rectangle { color: "transparent" width: 16 height: 16 - ToolTip { - palette: colors - visible: ma.containsMouse && state != MtxEvent.Empty - text: switch (state) { - case MtxEvent.Failed: return qsTr("Failed") - case MtxEvent.Sent: return qsTr("Sent") - case MtxEvent.Received: return qsTr("Received") - case MtxEvent.Read: return qsTr("Read") - default: return "" - } + + ToolTip.visible: ma.containsMouse && state != MtxEvent.Empty + ToolTip.text: switch (state) { + case MtxEvent.Failed: return qsTr("Failed") + case MtxEvent.Sent: return qsTr("Sent") + case MtxEvent.Received: return qsTr("Received") + case MtxEvent.Read: return qsTr("Read") + default: return "" } MouseArea{ id: ma diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index c33de47..a371f78 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -14,8 +14,6 @@ RowLayout { anchors.left: parent.left anchors.right: parent.right - //height: Math.max(model.replyTo ? reply.height + contentItem.height + 4 : contentItem.height, 16) - Column { Layout.fillWidth: true Layout.alignment: Qt.AlignTop @@ -42,71 +40,45 @@ RowLayout { state: model.state Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 + width: 16 } EncryptionIndicator { visible: model.isEncrypted Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 + width: 16 } ImageButton { Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 + width: 16 id: replyButton - hoverEnabled: true + hoverEnabled: true image: ":/icons/icons/ui/mail-reply.png" - ToolTip { - visible: replyButton.hovered - text: qsTr("Reply") - palette: colors - } + + ToolTip.visible: hovered + ToolTip.text: qsTr("Reply") onClicked: view.model.replyAction(model.id) } ImageButton { Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 + width: 16 id: optionsButton hoverEnabled: true image: ":/icons/icons/ui/vertical-ellipsis.png" - ToolTip { - visible: optionsButton.hovered - text: qsTr("Options") - palette: colors - } - onClicked: contextMenu.open() - - Menu { - y: optionsButton.height - id: contextMenu - palette: colors - - MenuItem { - text: qsTr("Read receipts") - onTriggered: view.model.readReceiptsAction(model.id) - } - MenuItem { - text: qsTr("Mark as read") - } - MenuItem { - text: qsTr("View raw message") - onTriggered: view.model.viewRawMessage(model.id) - } - MenuItem { - text: qsTr("Redact message") - onTriggered: view.model.redactEvent(model.id) - } - MenuItem { - visible: model.type == MtxEvent.ImageMessage || model.type == MtxEvent.VideoMessage || model.type == MtxEvent.AudioMessage || model.type == MtxEvent.FileMessage || model.type == MtxEvent.Sticker - text: qsTr("Save as") - onTriggered: timelineManager.timeline.saveMedia(model.id) - } - } + ToolTip.visible: hovered + ToolTip.text: qsTr("Options") + + onClicked: messageContextMenu.show(model.id, model.type, optionsButton) + } Text { @@ -120,10 +92,7 @@ RowLayout { hoverEnabled: true } - ToolTip { - visible: ma.containsMouse - text: Qt.formatDateTime(model.timestamp, Qt.DefaultLocaleLongDate) - palette: colors - } + ToolTip.visible: ma.containsMouse + ToolTip.text: Qt.formatDateTime(model.timestamp, Qt.DefaultLocaleLongDate) } } diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 956f7e0..d3bd8be 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import QtGraphicalEffects 1.0 import QtQuick.Window 2.2 @@ -14,6 +14,41 @@ Item { property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive property int avatarSize: 40 + Menu { + id: messageContextMenu + palette: colors + + function show(eventId_, eventType_, showAt) { + eventId = eventId_ + eventType = eventType_ + popup(showAt) + } + + property string eventId + property int eventType + + MenuItem { + text: qsTr("Read receipts") + onTriggered: chat.model.readReceiptsAction(messageContextMenu.eventId) + } + MenuItem { + text: qsTr("Mark as read") + } + MenuItem { + text: qsTr("View raw message") + onTriggered: chat.model.viewRawMessage(messageContextMenu.eventId) + } + MenuItem { + text: qsTr("Redact message") + onTriggered: chat.model.redactEvent(messageContextMenu.eventId) + } + MenuItem { + visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker + text: qsTr("Save as") + onTriggered: timelineManager.timeline.saveMedia(messageContextMenu.eventId) + } + } + id: timelineRoot Rectangle { @@ -63,7 +98,6 @@ Item { if (wheel.angleDelta != 0) { chat.contentY = chat.contentY - wheel.angleDelta.y wheel.accepted = true - chat.forceLayout() chat.returnToBounds() } } @@ -262,11 +296,8 @@ Item { height: 16 image: ":/icons/icons/ui/remove-symbol.png" - ToolTip { - visible: closeReplyButton.hovered - text: qsTr("Close") - palette: colors - } + ToolTip.visible: closeReplyButton.hovered + ToolTip.text: qsTr("Close") onClicked: timelineManager.updateReplyingEvent(undefined) }