From 7f6d036852e639ab216184e1747081708c5f6b4f Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sun, 9 Aug 2020 19:25:54 +0200 Subject: [PATCH] Improve NagScreen --- qml/components/Clipper.qml | 10 ++++++++++ qml/pages/DebugPage.qml | 2 +- qml/pages/NagScreen.qml | 9 ++++++++- translations/harbour-seaprint-de.ts | 14 ++++++++++++++ translations/harbour-seaprint-es.ts | 14 ++++++++++++++ translations/harbour-seaprint-fr.ts | 14 ++++++++++++++ translations/harbour-seaprint-zh_CN.ts | 14 ++++++++++++++ translations/harbour-seaprint.ts | 14 ++++++++++++++ 8 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 qml/components/Clipper.qml diff --git a/qml/components/Clipper.qml b/qml/components/Clipper.qml new file mode 100644 index 0000000..84b1e81 --- /dev/null +++ b/qml/components/Clipper.qml @@ -0,0 +1,10 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +MouseArea { + anchors.fill: parent + onPressAndHold: { + Clipboard.text = parent.text + notifier.notify(qsTr("Copied to clipboard")) + } +} diff --git a/qml/pages/DebugPage.qml b/qml/pages/DebugPage.qml index 73ec9d8..47adf80 100644 --- a/qml/pages/DebugPage.qml +++ b/qml/pages/DebugPage.qml @@ -36,7 +36,7 @@ Page { selectAll() copy() deselect() - notifier.notify("Copied to clipboard") + notifier.notify(qsTr("Copied to clipboard")) } } } diff --git a/qml/pages/NagScreen.qml b/qml/pages/NagScreen.qml index 1fd5cd1..72cf234 100644 --- a/qml/pages/NagScreen.qml +++ b/qml/pages/NagScreen.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 +import "../components" Page { backNavigation: false @@ -44,6 +45,8 @@ Page { font.family: "monospace" text: "devel-su" + Clipper {} + } Label { @@ -59,9 +62,13 @@ Page { font.family: "monospace" text: "pkcon install poppler-utils" + Clipper {} } - Item{} + Item{ + width: parent.width + height: Theme.itemSizeMedium + } Button { anchors.horizontalCenter: parent.horizontalCenter diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index db2eedd..b91bde3 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -122,6 +122,13 @@ + + Clipper + + Copied to clipboard + + + ConvertWorker @@ -160,6 +167,13 @@ + + DebugPage + + Copied to clipboard + + + FirstPage diff --git a/translations/harbour-seaprint-es.ts b/translations/harbour-seaprint-es.ts index 74d1b57..273ca75 100644 --- a/translations/harbour-seaprint-es.ts +++ b/translations/harbour-seaprint-es.ts @@ -122,6 +122,13 @@ Desconocido + + Clipper + + Copied to clipboard + + + ConvertWorker @@ -160,6 +167,13 @@ SeaPrint + + DebugPage + + Copied to clipboard + + + FirstPage diff --git a/translations/harbour-seaprint-fr.ts b/translations/harbour-seaprint-fr.ts index 2b6cca5..46d50f6 100644 --- a/translations/harbour-seaprint-fr.ts +++ b/translations/harbour-seaprint-fr.ts @@ -122,6 +122,13 @@ Inconnu + + Clipper + + Copied to clipboard + + + ConvertWorker @@ -160,6 +167,13 @@ SeaPrint + + DebugPage + + Copied to clipboard + + + FirstPage diff --git a/translations/harbour-seaprint-zh_CN.ts b/translations/harbour-seaprint-zh_CN.ts index 924aacb..5c3c359 100644 --- a/translations/harbour-seaprint-zh_CN.ts +++ b/translations/harbour-seaprint-zh_CN.ts @@ -122,6 +122,13 @@ 未知 + + Clipper + + Copied to clipboard + + + ConvertWorker @@ -160,6 +167,13 @@ SeaPrint(海印) + + DebugPage + + Copied to clipboard + + + FirstPage diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index 9950e1a..63c3318 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -122,6 +122,13 @@ + + Clipper + + Copied to clipboard + + + ConvertWorker @@ -160,6 +167,13 @@ + + DebugPage + + Copied to clipboard + + + FirstPage