diff --git a/gemini/qml/welcomepages/WelcomePageFilebrowser.qml b/gemini/qml/welcomepages/WelcomePageFilebrowser.qml index 4f4f3974ef8..626ce880add 100644 --- a/gemini/qml/welcomepages/WelcomePageFilebrowser.qml +++ b/gemini/qml/welcomepages/WelcomePageFilebrowser.qml @@ -1,160 +1,160 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 -import org.kde.kirigami 2.1 as Kirigami +import QtQuick.Controls 2.2 as QtControls import org.calligra 1.0 import "../components" Page { id: base; objectName: "WelcomePageFilebrowser"; property string categoryUIName: (docList.model === textDocumentsModel) ? "text documents" : "presentations" GridView { id: docList; contentWidth: width; anchors { margins: Constants.DefaultMargin; top: docTypeSelectorRow.bottom; left: parent.left; right: parent.right; bottom: parent.bottom; bottomMargin: 0; } cellWidth: width / 4 - Constants.DefaultMargin; cellHeight: cellWidth + Settings.theme.font("templateLabel").pixelSize + Constants.DefaultMargin * 4; model: textDocumentsModel; delegate: documentTile; ScrollDecorator { flickableItem: docList; } } Rectangle { anchors.fill: docTypeSelectorRow; } Label { id: docTypeSelectorRow; anchors { top: parent.top; left: parent.left; right: parent.right; } height: Constants.GridHeight * 1.5; verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; font: Settings.theme.font("pageHeader"); text: "Open From Your Library"; color: "#22282f"; CohereButton { anchors { left: parent.left; leftMargin: 20; verticalCenter: parent.verticalCenter; } text: "Open Other..."; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: mainWindow.openFile(); } Row { anchors { right: parent.right; rightMargin: 20; verticalCenter: parent.verticalCenter; } height: parent.height - Constants.DefaultMargin * 2; spacing: 4; CohereButton { anchors.verticalCenter: parent.verticalCenter; text: "Text Documents"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); checkedColor: "#D2D4D5"; onClicked: { if(!checked) { docList.model = textDocumentsModel; } } checked: docList.model === textDocumentsModel; } CohereButton { anchors.verticalCenter: parent.verticalCenter; text: "Presentations"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); checkedColor: "#D2D4D5"; onClicked: { if(!checked) { docList.model = presentationDocumentsModel; } } checked: docList.model === presentationDocumentsModel; } } } - Kirigami.Label { + QtControls.Label { anchors.fill: parent; text: "No %1\n\nPlease drop some into your Documents folder\n(%2)".arg(base.categoryUIName).arg(docList.model.documentsFolder); horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; visible: docList.count === 0; } Component { id: documentTile; Item { width: docList.cellWidth; height: docList.cellHeight Rectangle { x: documentImage.x - Constants.DefaultMargin + (documentImage.width - documentImage.paintedWidth) / 2; y: documentImage.y - Constants.DefaultMargin + (documentImage.height - documentImage.paintedHeight) / 2; width: documentImage.paintedWidth + Constants.DefaultMargin * 2; height: documentImage.paintedHeight + Constants.DefaultMargin * 2; border { color: "silver"; width: 1; } } Image { id: documentImage; source: "image://recentimage/" + model.filePath; anchors { top: parent.top; left: parent.left; right: parent.right; margins: Constants.DefaultMargin / 2; } height: parent.width; fillMode: Image.PreserveAspectFit; smooth: true; asynchronous: true; } - Kirigami.Label { + QtControls.Label { id: lblName; anchors { left: parent.left; right: parent.right; bottom: parent.bottom; margins: Constants.DefaultMargin; bottomMargin: Constants.DefaultMargin * 2; } height: font.pixelSize + Constants.DefaultMargin * 2; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; text: model.fileName ? model.fileName : ""; } MouseArea { anchors.fill: parent; onClicked: { baseLoadingDialog.visible = true; openFile(model.filePath); } } } } } diff --git a/gemini/qml/welcomepages/cloud/AddDropbox.qml b/gemini/qml/welcomepages/cloud/AddDropbox.qml index 292aeb59f04..6d5cb1f59c2 100644 --- a/gemini/qml/welcomepages/cloud/AddDropbox.qml +++ b/gemini/qml/welcomepages/cloud/AddDropbox.qml @@ -1,55 +1,55 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 -import QtQuick.Controls 1.4 as QtControls +import QtQuick.Controls 2.2 as QtControls import "dropbox" as Dropbox Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property string serviceName: ""; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } Dropbox.SetupPage { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(8); } QtControls.Button { anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Close"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/AddGit.qml b/gemini/qml/welcomepages/cloud/AddGit.qml index 52efaca179d..0f34148b89b 100644 --- a/gemini/qml/welcomepages/cloud/AddGit.qml +++ b/gemini/qml/welcomepages/cloud/AddGit.qml @@ -1,61 +1,61 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 -import QtQuick.Controls 1.4 as QtControls +import QtQuick.Controls 2.2 as QtControls Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property string serviceName: ""; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } Loader { anchors { top: parent.top; left: parent.left; right: parent.right; bottom: closeButton.top; margins: Settings.theme.adjustedPixel(8); } source: "git/createCheckoutContainer.qml"; } QtControls.Button { id: closeButton; anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Close"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/AddWebdav.qml b/gemini/qml/welcomepages/cloud/AddWebdav.qml index eaf87adbcee..18ba42273ba 100644 --- a/gemini/qml/welcomepages/cloud/AddWebdav.qml +++ b/gemini/qml/welcomepages/cloud/AddWebdav.qml @@ -1,56 +1,55 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 -import QtQuick.Controls 1.4 as QtControls -import org.kde.kirigami 2.1 as Kirigami +import QtQuick.Controls 2.2 as QtControls Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property string serviceName: ""; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } - Kirigami.Label { + QtControls.Label { anchors.fill: parent; horizontalAlignment: Text.AlignHCenter; text: "Sorry, support for WebDav is not yet implemented."; } QtControls.Button { anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Close"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/CloudAccounts.qml b/gemini/qml/welcomepages/cloud/CloudAccounts.qml index 93782f8d0f4..de0ab908e10 100644 --- a/gemini/qml/welcomepages/cloud/CloudAccounts.qml +++ b/gemini/qml/welcomepages/cloud/CloudAccounts.qml @@ -1,229 +1,228 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 -import QtQuick.Controls 1.4 as QtControls -import org.kde.kirigami 2.1 as Kirigami +import QtQuick.Controls 2.2 as QtControls import org.calligra 1.0 import Calligra.Gemini.Dropbox 1.0 import "../../components" import "dropbox" as Dropbox import "git" as Git Page { id: base; property string pageName: "accountsPage"; property QtObject accountsList; signal showAccount(var index, var stackComponent, var accountDetails); Connections { target: controllerMIT; onNeedAuthenticateChanged: { if(controllerMIT.needAuthenticate) { cloudAccounts.removeAccountByName("Dropbox"); } else { cloudAccounts.addAccount("Dropbox", "DropBox", "accountsPageDropbox", 0, true); } } } Component.onCompleted: { if(!controllerMIT.needAuthenticate) { cloudAccounts.addAccount("Dropbox", "DropBox", "accountsPageDropbox", 0, true); } } ListView { id: accountsView; anchors { top: parent.top; left: parent.left; right: parent.right; bottom: bottomButtons.top; } clip: true; model: accountsList; delegate: Item { height: Settings.theme.adjustedPixel(64); width: ListView.view.width; - Kirigami.Label { + QtControls.Label { anchors { top: parent.top; left: parent.left; right: accountControls.left; bottom: parent.bottom; } text: model.text; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter; font: Settings.theme.font("templateLabel"); MouseArea { anchors.fill: parent; onClicked: base.showAccount(model.index, model.stackComponent, model.accountDetails); } } Row { id: accountControls; anchors { verticalCenter: parent.verticalCenter; right: parent.right; } width: childrenRect.width; spacing: Settings.theme.adjustedPixel(8); Text { text: model.accountType; width: Settings.theme.adjustedPixel(100); height: parent.height; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter; font: Settings.theme.font("templateLabel"); color: "#5b6573"; visible: model.accountType !== "DropBox"; } QtControls.Button { anchors.verticalCenter: parent.verticalCenter; text: (model.accountType === "DropBox") ? "Sign Out" : "Edit Account"; onClicked: { dlgStack.replace(base.editComponentFromName(model.accountType)); if(dlgStack.currentPage.accountIndex !== undefined) { dlgStack.currentPage.accountIndex = index; dlgStack.currentPage.text = model.text; } } } QtControls.Button { anchors.verticalCenter: parent.verticalCenter; text: "Remove"; visible: model.accountType !== "DropBox"; onClicked: { dlgStack.replace(removeAccountDlg); if(dlgStack.currentPage.accountIndex !== undefined) { dlgStack.currentPage.accountIndex = index; dlgStack.currentPage.text = model.text; } } } } } } - Kirigami.Label { + QtControls.Label { anchors.fill: accountsView; text: "You have no cloud accounts defined. Please add one by clicking on your service of choice below."; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; opacity: accountsList.count === 0 ? 1 : 0; Behavior on opacity { PropertyAnimation { duration: Constants.AnimationDuration; } } } Item { id: bottomButtons; anchors { left: parent.left; right: parent.right; bottom: parent.bottom; } height: bottomButtonRow.height + Settings.theme.adjustedPixel(8); - Kirigami.Label { + QtControls.Label { anchors.fill: parent; text: "Add new account:"; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter; } Row { id: bottomButtonRow; anchors { verticalCenter: parent.verticalCenter; right: parent.right; } height: childrenRect.height; spacing: Settings.theme.adjustedPixel(8); Repeater { model: ListModel { ListElement { text: "Dropbox"; accountType: "DropBox"; serviceName: "dropbox"; } ListElement { text: "WebDav"; accountType: "WebDav"; serviceName: ""; } //ListElement { text: "ownCloud"; accountType: "WebDav"; serviceName: "ownCloud"; } ListElement { text: "Git"; accountType: "Git"; serviceName: ""; } //ListElement { text: "GitHub"; accountType: "Git"; serviceName: "github"; } //ListElement { text: "bitbucket (git)"; accountType: "Git"; serviceName: "bitbucket"; } } QtControls.Button { text: model.text onClicked: { dlgStack.replace(base.addComponentFromName(model.accountType)); dlgStack.currentPage.serviceName = model.serviceName; } } } } } PageStack { id: dlgStack; anchors { fill: base; margins: -Settings.theme.adjustedPixel(8); } initialPage: addEmptyComp; } function addComponentFromName(name) { var elements = { "DropBox": addDropBox, "WebDav": addWebDav, "Git": addGit }; return elements[name]; } Component { id: addEmptyComp; Item {} } Component { id: addDropBox; AddDropbox { addEmpty: addEmptyComp; } } Component { id: addWebDav; AddWebdav { addEmpty: addEmptyComp; } } Component { id: addGit; AddGit { addEmpty: addEmptyComp; } } function editComponentFromName(name) { var elements = { "DropBox": editDropBox, "WebDav": editWebDav, "Git": editGit }; return elements[name]; } Component { id: editDropBox; AddDropbox { addEmpty: addEmptyComp; } } Component { id: editWebDav; EditDetailsBase { addEmpty: addEmptyComp; } } Component { id: editGit; EditGit { addEmpty: addEmptyComp; } } Component { id: removeAccountDlg; RemoveAccountDlg { addEmpty: addEmptyComp; } } } diff --git a/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml b/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml index 2b0c2390c6d..a29ccc73ffb 100644 --- a/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml +++ b/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml @@ -1,105 +1,104 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 -import QtQuick.Controls 1.4 as QtControls -import org.kde.kirigami 2.1 as Kirigami +import QtQuick.Controls 2.2 as QtControls import org.calligra 1.0 Rectangle { id: base; anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property int accountIndex: -1; property string text; onTextChanged: { nameField.text = text; } property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } - Kirigami.Label { + QtControls.Label { anchors { bottom: parent.verticalCenter; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; text: "Do you wish to remove this account?"; } - Kirigami.Label { + QtControls.Label { id: nameField; anchors { top: parent.verticalCenter; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; } - Kirigami.Label { + QtControls.Label { anchors { top: nameField.bottom; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; text: "(removing the account will leave all files in place, this only removes it from Calligra Gemini's list)"; } QtControls.Button { id: okButton; anchors { bottom: parent.bottom; right: cancelButton.left; margins: Settings.theme.adjustedPixel(8); } text: "Remove Account"; onClicked: { cloudAccounts.removeAccount(base.accountIndex); dlgStack.replace(addEmpty); } } QtControls.Button { id: cancelButton; anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Cancel"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/git/RepositoryContent.qml b/gemini/qml/welcomepages/cloud/git/RepositoryContent.qml index e114e9b55b2..bd6dd32e238 100644 --- a/gemini/qml/welcomepages/cloud/git/RepositoryContent.qml +++ b/gemini/qml/welcomepages/cloud/git/RepositoryContent.qml @@ -1,259 +1,259 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 -import QtQuick.Controls 1.4 as QtControls +import QtQuick.Controls 2.2 as QtControls import org.kde.kirigami 2.1 as Kirigami import org.calligra 1.0 import Calligra.Gemini.Git 1.0 import "../../../components" Item { property alias localrepo: gitController.cloneDir; property alias privateKeyFile: gitController.privateKeyFile; property alias needsPrivateKeyPassphrase: gitController.needsPrivateKeyPassphrase; property alias publicKeyFile: gitController.publicKeyFile; property alias userForRemote: gitController.userForRemote; GitController { id: gitController; currentFile: Settings.currentFile; onPullCompleted: { logModel.refreshLog(); updatedLabel.opacity = 1; if(DocumentManager.doc()) { DocumentManager.doc().clearStatusBarMessage(); } } onTransferProgress: { if(DocumentManager.doc()) { DocumentManager.doc().sigProgress(progress); } console.log("Transfer progress: " + progress); } onOperationBegun: { console.log(message); if(DocumentManager.doc()) { DocumentManager.doc().statusBarMessage(message); } } onPushCompleted: { if(DocumentManager.doc()) { DocumentManager.doc().clearStatusBarMessage(); } } } GitLogModel { id: logModel; repoDir: gitController.cloneDir; } Item { id: logSidebar; anchors { margins: Constants.DefaultMargin; top: parent.top; right: parent.right; bottom: parent.bottom; bottomMargin: 0; } width: (parent.width / 4) - Constants.DefaultMargin; QtControls.Button { id: pullButton; anchors { top: parent.top; horizontalCenter: parent.horizontalCenter; margins: Settings.theme.adjustedPixel(8); } text: "Pull from upstream"; onClicked: { enabled = false; pullInProgress.opacity = 1; gitController.pull(); } QtControls.BusyIndicator { id: pullInProgress; opacity: 0; running: true; height: parent.height; width: height; anchors.centerIn: parent; Behavior on opacity { PropertyAnimation { duration: Constants.AnimationDuration; } } anchors { top: pullButton.bottom; left: parent.left; right: parent.right; } } } - Kirigami.Label { + QtControls.Label { id: updatedLabel; opacity: 0; Behavior on opacity { SequentialAnimation { ScriptAction { script: pullInProgress.opacity = 0; } PropertyAnimation { duration: Constants.AnimationDuration; } ScriptAction { script: hideUpdate.start(); } } } height: opacity * Constants.GridHeight / 2; anchors { top: pullButton.bottom; left: parent.left; right: parent.right; } text: "Update Completed!"; verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; Timer { id: hideUpdate; running: false; repeat: false; interval: 1000; onTriggered: { updatedLabel.opacity = 0; pullButton.enabled = true; } } } ListView { id: logListView; model: logModel; clip: true; anchors { margins: Constants.DefaultMargin; top: updatedLabel.bottom; left: parent.left; right: parent.right; bottom: parent.bottom; } - header: Kirigami.Label { + header: QtControls.Label { width: logListView.width; height: Constants.GridHeight / 2; text: "Recent Changes"; verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; } delegate: Column { width: logListView.width; height: childrenRect.height; - Kirigami.Label { + QtControls.Label { id: messageText; width: parent.width; height: paintedHeight; text: model.shortMessage; wrapMode: Text.Wrap; } - Kirigami.Label { + QtControls.Label { id: timeText; width: parent.width; height: paintedHeight; opacity: 0.7; text: "on " + model.time; } - Kirigami.Label { + QtControls.Label { id: nameText; width: parent.width; height: paintedHeight; opacity: 0.7 text: "by " + model.authorName; } Item { width: parent.width; height: nameText.height; Rectangle { width: parent.width - (Constants.DefaultMargin * 2); height: 1; anchors.centerIn: parent; opacity: 0.3; color: "black"; } } } } ScrollDecorator { flickableItem: logListView; anchors.fill: logListView; } } GridView { id: docList; clip: true; contentWidth: width; anchors { margins: Constants.DefaultMargin; top: parent.top; topMargin: Constants.DefaultMargin * 2; left: parent.left; right: logSidebar.left; bottom: parent.bottom; bottomMargin: 0; } cellWidth: width / 3 - Constants.DefaultMargin; cellHeight: cellWidth + Settings.theme.font("templateLabel").pixelSize + Constants.DefaultMargin * 4; model: gitController.documents; delegate: documentTile; ScrollDecorator { flickableItem: docList; } } - Kirigami.Label { + QtControls.Label { anchors.fill: parent; text: "No Documents\n\nPlease add some documents to your reporitory.\n(%1)".arg(docList.model.documentsFolder); horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; visible: docList.count === 0; } Component { id: documentTile; Item { width: docList.cellWidth; height: docList.cellHeight Rectangle { x: documentImage.x - Constants.DefaultMargin + (documentImage.width - documentImage.paintedWidth) / 2; y: documentImage.y - Constants.DefaultMargin + (documentImage.height - documentImage.paintedHeight) / 2; width: documentImage.paintedWidth + Constants.DefaultMargin * 2; height: documentImage.paintedHeight + Constants.DefaultMargin * 2; border { color: "silver"; width: 1; } } Image { id: documentImage; source: "image://recentimage/" + model.filePath; anchors { top: parent.top; left: parent.left; right: parent.right; margins: Constants.DefaultMargin; } height: parent.width; fillMode: Image.PreserveAspectFit; smooth: true; asynchronous: true; } - Kirigami.Label { + QtControls.Label { id: lblName; anchors { left: parent.left; right: parent.right; bottom: parent.bottom; margins: Constants.DefaultMargin; bottomMargin: Constants.DefaultMargin * 2; } height: font.pixelSize + Constants.DefaultMargin * 2; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; text: model.fileName ? model.fileName : ""; } MouseArea { anchors.fill: parent; onClicked: { baseLoadingDialog.visible = true; openFile(model.filePath, gitController.commitAndPushCurrentFileAction()); } } } } }