Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher Redesign (qt5) #37

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Resources/button-active.png
Binary file not shown.
Binary file removed Resources/button-tab-active.png
Binary file not shown.
Binary file removed Resources/button-tab-selected.png
Binary file not shown.
Binary file removed Resources/button-tab.png
Binary file not shown.
Binary file removed Resources/button.png
Binary file not shown.
Binary file removed Resources/dropdown-active.png
Binary file not shown.
Binary file removed Resources/dropdown-bg.png
Binary file not shown.
Binary file removed Resources/dropdown.png
Binary file not shown.
Binary file removed Resources/field-active.png
Binary file not shown.
Binary file removed Resources/field.png
Binary file not shown.
Binary file modified Resources/green-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/icon-home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/icon-news.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/icon-settings.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Resources/progressbar-progress.png
Binary file not shown.
Binary file removed Resources/progressbar.png
Binary file not shown.
529 changes: 355 additions & 174 deletions mcpelauncher_de.ts

Large diffs are not rendered by default.

526 changes: 345 additions & 181 deletions mcpelauncher_en.ts

Large diffs are not rendered by default.

526 changes: 345 additions & 181 deletions mcpelauncher_fr.ts

Large diffs are not rendered by default.

20 changes: 7 additions & 13 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
<file>qml/ThemedControls/MBusyIndicator.qml</file>
<file>qml/ThemedControls/MButton.qml</file>
<file>qml/ThemedControls/MCheckBox.qml</file>
<file>qml/ThemedControls/BaseHeader.qml</file>
<file>qml/ThemedControls/HorizontalDivider.qml</file>
<file>qml/ThemedControls/MSideBarItem.qml</file>
<file>qml/ThemedControls/CenteredScrollView.qml</file>
<file>qml/MinecraftNews.qml</file>
<file>qml/Launcher.qml</file>
<file>qml/LauncherMain.qml</file>
<file>qml/LauncherBase.qml</file>
<file>qml/LauncherLogin.qml</file>
<file>qml/CenteredRectangle.qml</file>
<file>qml/ProfileComboBox.qml</file>
<file>qml/GoogleTosApprovalWindow.qml</file>
<file>qml/EditProfileWindow.qml</file>
Expand All @@ -27,22 +31,12 @@
<file>Resources/noise.png</file>
<file>Resources/mcpelauncher-logo.png</file>
<file>Resources/green-button.png</file>
<file>Resources/dropdown.png</file>
<file>Resources/dropdown-bg.png</file>
<file>Resources/dropdown-active.png</file>
<file>Resources/progressbar.png</file>
<file>Resources/progressbar-progress.png</file>
<file>Resources/field.png</file>
<file>Resources/field-active.png</file>
<file>Resources/button-active.png</file>
<file>Resources/button.png</file>
<file>Resources/button-tab.png</file>
<file>Resources/button-tab-active.png</file>
<file>Resources/button-tab-selected.png</file>
<file>Resources/check.png</file>
<file>Resources/icon-edit.png</file>
<file>Resources/icon-settings.png</file>
<file>Resources/icon-copy.png</file>
<file>Resources/icon-home.png</file>
<file>Resources/icon-news.png</file>
<file>qml/ThemedControls/MTabButton.qml</file>
<file>qml/LauncherSettingsGeneral.qml</file>
<file>qml/TroubleshooterWindow.qml</file>
Expand Down
23 changes: 10 additions & 13 deletions qml/ApkImportHelper.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 2.4
import QtQuick 2.9

import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
Expand All @@ -8,30 +8,29 @@ import io.mrarm.mcpelauncher 1.0
import "ThemedControls"

Item {

signal started()
signal finished()
signal error()
signal started
signal finished
signal error

property VersionManager versionManager
property bool extractingApk: false
property var progressBar: null
property alias task: apkExtractionTask
property var allowIncompatible: false
property bool allowIncompatible: false

id: root

FileDialog {
id: apkPicker
title: "Please pick the Minecraft .apk file"
nameFilters: [ "Android package files (*.apk *.zip)", "All files (*)" ]
nameFilters: ["Android package files (*.apk *.zip)", "All files (*)"]
selectMultiple: true

onAccepted: {
if (!apkExtractionTask.setSourceUrls(fileUrls)) {
apkExtractionMessageDialog.text = "Invalid file URL"
apkExtractionMessageDialog.open()
return;
return
}
console.log("Extracting " + apkExtractionTask.sources.join(','))
extractingApk = true
Expand All @@ -44,17 +43,17 @@ Item {
id: apkExtractionTask
versionManager: root.versionManager

onProgress: function(val) {
onProgress: function (val) {
root.progressBar.indeterminate = false
root.progressBar.value = val
}

onFinished: function() {
onFinished: function () {
root.finished()
extractingApk = false
}

onError: function(err) {
onError: function (err) {
apkExtractionMessageDialog.text = qsTr("The specified file is not compatible with the launcher<br/>Login to Google Play with an account owning Minecraft ( Playstore ) and let the launcher download compatible versions, including previous versions of Minecraft<br/>Details:<br/>%1").arg(err)
apkExtractionMessageDialog.open()
extractingApk = false
Expand All @@ -69,9 +68,7 @@ Item {
title: "Apk extraction"
}


function pickFile() {
apkPicker.open()
}

}
20 changes: 7 additions & 13 deletions qml/ApkImportWindow.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 2.4
import QtQuick 2.9

import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
Expand All @@ -8,7 +8,6 @@ import io.mrarm.mcpelauncher 1.0
import "ThemedControls"

Window {

property VersionManager versionManager

id: root
Expand All @@ -17,29 +16,25 @@ Window {
flags: Qt.Dialog
title: "Minecraft .apk import"
visible: apkImportHelper.extractingApk
property var allowIncompatible: false
color: "#333"

property bool allowIncompatible: false

onClosing: function() {
onClosing: function () {
close.accepted = false
}

ColumnLayout {
id: layout
anchors.fill: parent
anchors.margins: 10
spacing: 10

Text {
text: "Extracting the .apk"
Layout.fillWidth: true
}

MProgressBar {
id: apkExtractionProgressBar
width: parent.width
label: qsTr("Extracting the .apk")
Layout.fillWidth: true
Layout.minimumHeight: 30
}

}

ApkImportHelper {
Expand All @@ -52,5 +47,4 @@ Window {
function pickFile() {
apkImportHelper.pickFile()
}

}
23 changes: 0 additions & 23 deletions qml/CenteredRectangle.qml

This file was deleted.

Loading
Loading