From 2d754dac6db66e5559c2a7a2ba44e85bbd096eb8 Mon Sep 17 00:00:00 2001
From: Adriaan de Groot
Date: Wed, 19 Feb 2020 17:15:40 +0100
Subject: [PATCH] [notesqml] Rename example file to save translators
---
.../{dummyqml.qml => notesqml.qml.example} | 31 +++++++++++++------
1 file changed, 21 insertions(+), 10 deletions(-)
rename src/modules/notesqml/examples/{dummyqml.qml => notesqml.qml.example} (75%)
diff --git a/src/modules/notesqml/examples/dummyqml.qml b/src/modules/notesqml/examples/notesqml.qml.example
similarity index 75%
rename from src/modules/notesqml/examples/dummyqml.qml
rename to src/modules/notesqml/examples/notesqml.qml.example
index 3cbfa65fc..a41fa98fd 100644
--- a/src/modules/notesqml/examples/dummyqml.qml
+++ b/src/modules/notesqml/examples/notesqml.qml.example
@@ -1,6 +1,7 @@
/* === This file is part of Calamares - ===
*
* Copyright 2020, Anke Boersma
+ * Copyright 2020, Adriaan de Groot
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,6 +17,14 @@
* along with Calamares. If not, see .
*/
+/* Some Calamares internals are available to all QML modules.
+ * They live in the calamares.ui namespace (filled programmatically
+ * by Calamares). One of the internals that is exposed is the
+ * Branding object, which can be used to retrieve strings and paths
+ * and colors.
+ */
+import calamares.ui 1.0
+
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Window 2.2
@@ -30,8 +39,9 @@ Item {
id: flick
anchors.fill: parent
contentHeight: 800
-
+
ScrollBar.vertical: ScrollBar {
+ id: fscrollbar
width: 10
policy: ScrollBar.AlwaysOn
}
@@ -40,33 +50,34 @@ Item {
id: intro
x: 1
y: 0
- width: 720
+ width: parent.width - fscrollbar.width
font.pointSize: 14
textFormat: Text.RichText
antialiasing: true
activeFocusOnPress: false
wrapMode: Text.WordWrap
- text: qsTr("Generic GNU/Linux 2017.8 LTS Soapy Sousaphone
+ text: qsTr("%1
This an example QML file, showing options in RichText with Flickable content.
-
+
QML with RichText can use HTML tags, Flickable content is useful for touchscreens.
-
+
This is bold text
This is italic text
This is underlined text
- This is strikethrough
-
+ This text will be center-aligned.
+ This is strikethrough
+
Code example:
ls -l /home
-
+
Lists:
- Intel CPU systems
- AMD CPU systems
-
- The vertical scrollbar is adjustable, current width set to 10.
")
+
+ The vertical scrollbar is adjustable, current width set to 10.
").arg(Branding.string(Branding.VersionedName))
}
}