From 828448b2ffded48dc7f5de8c98fa5d42e0440d0b Mon Sep 17 00:00:00 2001
From: demmm
Date: Mon, 20 Apr 2020 16:47:12 +0200
Subject: [PATCH] [welcomeq] make release notes part of welcome window use
Loader option for those notes too, commented out file shows it is possible to
load from anywhere
---
src/modules/welcomeq/release_notes.qml | 100 +++++++++++++++++++++++++
src/modules/welcomeq/welcomeq.qml | 3 +-
src/modules/welcomeq/welcomeq.qrc | 1 +
3 files changed, 103 insertions(+), 1 deletion(-)
create mode 100644 src/modules/welcomeq/release_notes.qml
diff --git a/src/modules/welcomeq/release_notes.qml b/src/modules/welcomeq/release_notes.qml
new file mode 100644
index 000000000..ce9d1d4af
--- /dev/null
+++ b/src/modules/welcomeq/release_notes.qml
@@ -0,0 +1,100 @@
+/* === This file is part of Calamares - ===
+ *
+ * Copyright 2020, Anke Boersma
+ *
+ * Calamares is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Calamares is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Calamares. If not, see .
+ */
+
+import io.calamares.ui 1.0
+
+import QtQuick 2.7
+import QtQuick.Controls 2.2
+import QtQuick.Window 2.2
+import QtQuick.Layouts 1.3
+
+Rectangle {
+ width: parent.width
+ height: parent.height
+ focus: true
+ color: "#f2f2f2"
+
+ Flickable {
+ id: flick
+ anchors.fill: parent
+ contentHeight: 3500
+
+ ScrollBar.vertical: ScrollBar {
+ id: fscrollbar
+ width: 10
+ policy: ScrollBar.AlwaysOn
+ }
+
+ TextArea {
+ id: intro
+ x: 130
+ y: 8
+ width: 640
+ font.pointSize: 14
+ textFormat: Text.RichText
+ antialiasing: true
+ activeFocusOnPress: false
+ wrapMode: Text.WordWrap
+
+ 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 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.
").arg(Branding.string(Branding.VersionedName))
+
+ }
+ }
+
+ ToolButton {
+ id: toolButton
+ x: 19
+ y: 29
+ width: 105
+ height: 48
+ text: qsTr("Back")
+ hoverEnabled: true
+ onClicked: load.source = ""
+
+ Image {
+ id: image1
+ x: 0
+ y: 13
+ width: 22
+ height: 22
+ source: "img/chevron-left-solid.svg"
+ fillMode: Image.PreserveAspectFit
+ }
+ }
+
+}
diff --git a/src/modules/welcomeq/welcomeq.qml b/src/modules/welcomeq/welcomeq.qml
index 8d6d47dc1..6330f5116 100644
--- a/src/modules/welcomeq/welcomeq.qml
+++ b/src/modules/welcomeq/welcomeq.qml
@@ -110,7 +110,8 @@ Page
Kirigami.Theme.textColor: Kirigami.Theme.textColor
visible: config.releaseNotesUrl !== ""
- onClicked: Qt.openUrlExternally(config.releaseNotesUrl)
+ onClicked: load.source = "release_notes.qml"
+ //onClicked: load.source = "file:/usr/share/calamares/release_notes.qml"
}
Button {
diff --git a/src/modules/welcomeq/welcomeq.qrc b/src/modules/welcomeq/welcomeq.qrc
index 82c449bf4..71431254e 100644
--- a/src/modules/welcomeq/welcomeq.qrc
+++ b/src/modules/welcomeq/welcomeq.qrc
@@ -2,6 +2,7 @@
welcomeq.qml
about.qml
+ release_notes.qml
img/squid.png
img/chevron-left-solid.svg
img/language-icon-48px.png