diff --git a/plugins/welcomepage/qml/Develop.qml b/plugins/welcomepage/qml/Develop.qml index 208f1d76f..2da8c2810 100644 --- a/plugins/welcomepage/qml/Develop.qml +++ b/plugins/welcomepage/qml/Develop.qml @@ -1,103 +1,101 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.Layouts 1.2 import QtQuick.Controls 1.3 import org.kdevelop.welcomepage 4.3 StandardPage { - RowLayout { - id: toolBar - anchors { - top: parent.top - left: parent.left - right: parent.right - margins: 25 - } - Link { - iconName: "project-development-new-template" - text: i18n("New Project") - onClicked: kdev.retrieveMenuAction("project/project_new").trigger() - } + ColumnLayout { + anchors.fill: parent + anchors.margins: 20 - Link { - text: i18n("Open Project") - iconName: "project-development-open" - onClicked: ICore.projectController().openProject() - } + spacing: 20 - Link { - text: i18n("Fetch Project") - iconName: "download" - onClicked: kdev.retrieveMenuAction("project/project_fetch").trigger() - } + RowLayout { + id: toolBar + + width: parent.width + + Button { + iconName: "project-development-new-template" + text: i18n("New Project") + onClicked: kdev.retrieveMenuAction("project/project_new").trigger() + } + + Button { + text: i18n("Open Project") + iconName: "project-development-open" + onClicked: ICore.projectController().openProject() + } + + Button { + text: i18n("Fetch Project") + iconName: "download" + onClicked: kdev.retrieveMenuAction("project/project_fetch").trigger() + } - Link { - iconName: "document-open-recent" - text: i18n("Recent Projects") - onClicked: kdev.showMenu("project/project_open_recent") + Button { + iconName: "document-open-recent" + text: i18n("Recent Projects") + onClicked: kdev.showMenu("project/project_open_recent") + } + Item { + Layout.fillWidth: true + } } - Item { + + ScrollView { + Layout.fillHeight: true Layout.fillWidth: true - } - } - ScrollView { - anchors { - left: parent.left - top: toolBar.bottom - bottom: parent.bottom - right: parent.right - bottomMargin: 30 - leftMargin: 30 - rightMargin: 30 - } - ListView { - id: sessionsView - clip: true - - delegate: MouseArea { - width: sessionsView.width - height: visible ? 30 : 0 - visible: projects.length > 0 - onClicked: sessions.loadSession(uuid) - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - - Label { - width: parent.width - readonly property string projectNamesString: projectNames.join(", ").replace(/.kdev4/g, "") - text: display=="" ? projectNamesString : i18n("%1: %2", display, projectNamesString) - elide: Text.ElideRight - opacity: parent.containsMouse ? 0.8 : 1 - } + ListView { + id: sessionsView + + anchors.fill: parent + + delegate: MouseArea { + width: sessionsView.width + height: visible ? 30 : 0 + visible: projects.length > 0 + onClicked: sessions.loadSession(uuid) + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + + Label { + width: parent.width + readonly property string projectNamesString: projectNames.join(", ").replace(/.kdev4/g, "") + text: display=="" ? projectNamesString : i18n("%1: %2", display, projectNamesString) + elide: Text.ElideRight + opacity: parent.containsMouse ? 0.8 : 1 } + } - model: SessionsModel { id: sessions } + model: SessionsModel { id: sessions } - header: Heading { - height: 1.25*implicitHeight - text: i18n("Sessions") + header: Heading { + text: i18n("Sessions") + } } } } } diff --git a/plugins/welcomepage/qml/GettingStarted.qml b/plugins/welcomepage/qml/GettingStarted.qml index 390250306..a8760b00a 100644 --- a/plugins/welcomepage/qml/GettingStarted.qml +++ b/plugins/welcomepage/qml/GettingStarted.qml @@ -1,105 +1,85 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.Layouts 1.2 import QtQuick.Controls 1.2 import QtWebKit 3.0 StandardPage { ColumnLayout { id: options anchors.top: parent.top anchors.left: parent.left anchors.margins: 30 spacing: 10 width: 200 - Link { - Layout.fillWidth: true - text: i18n("Official Website") - onClicked: info.state="kdevelop.org" - } - Link { - Layout.fillWidth: true - text: i18n("Userbase") - onClicked: info.state="userbase" - } - Link { - Layout.fillWidth: true - text: i18n("Techbase") - onClicked: info.state="techbase" - } - Link { - Layout.fillWidth: true - text: i18n("Handbook") - onClicked: kdev.retrieveMenuAction("help/help_contents").trigger() - } } Column { id: info anchors { top: parent.top left: options.right right: parent.right margins: 30 } spacing: 10 WebView { id: webview width: parent.width height: 200 MouseArea { anchors.fill: parent; hoverEnabled: true } } Label { id: description width: parent.width } Button { text: i18n("Go!") onClicked: Qt.openUrlExternally(webview.url) } state: "kdevelop.org" states: [ State { name: "userbase" PropertyChanges { target: webview; url: "http://userbase.kde.org/KDevelop" } PropertyChanges { target: description; text: i18n("Documentation for KDevelop users") } }, State { name: "kdevelop.org" PropertyChanges { target: webview; url: "http://kdevelop.org" } PropertyChanges { target: description; text: i18n("Keep up with KDevelop's development") } }, State { name: "techbase" PropertyChanges { target: webview; url: "http://techbase.kde.org/KDevelop" } PropertyChanges { target: description; text: i18n("Help us improve KDevelop") } } ] } } diff --git a/plugins/welcomepage/qml/Heading.qml b/plugins/welcomepage/qml/Heading.qml index 63717c185..96e5caaa5 100644 --- a/plugins/welcomepage/qml/Heading.qml +++ b/plugins/welcomepage/qml/Heading.qml @@ -1,26 +1,29 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.Controls 1.3 Label { Label { id: instance } - font.pointSize: instance.font.pointSize*2 + property real scale: 1.4 + + height: 2 * implicitHeight + font.pointSize: instance.font.pointSize * scale } diff --git a/plugins/welcomepage/qml/Link.qml b/plugins/welcomepage/qml/Link.qml index 8b1d36a64..0a3fa05d8 100644 --- a/plugins/welcomepage/qml/Link.qml +++ b/plugins/welcomepage/qml/Link.qml @@ -1,25 +1,27 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.1 +import QtQuick.Layouts 1.2 import QtQuick.Controls 1.3 +import QtQuick.Controls.Styles 1.3 -Button { +ToolButton { } diff --git a/plugins/welcomepage/qml/StandardBackground.qml b/plugins/welcomepage/qml/StandardBackground.qml index c76d5de63..cae39be47 100644 --- a/plugins/welcomepage/qml/StandardBackground.qml +++ b/plugins/welcomepage/qml/StandardBackground.qml @@ -1,72 +1,56 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.3 +import QtQuick.Layouts 1.2 -Rectangle +GroupBox { id: bg - property Component tools: null + property alias tools: toolsLoader.sourceComponent property string pageIcon - property real marginLeft: toolbar.x+toolbar.width + readonly property real marginLeft: toolsLoader.x + toolsLoader.width property real margins: 5 - color: pal.base - SystemPalette { id: pal } - - Rectangle { - id: toolbar + Loader { + id: toolsLoader - radius: 5 - color: Qt.rgba(0.8, 0.8, 0.8, 0.4) + width: 200 anchors { top: parent.top left: parent.left - margins: parent.margins - } - width: toolsLoader.width + 2*toolsLoader.margins - height: toolsLoader.height + 2*toolsLoader.margins - Loader { - id: toolsLoader - - property int margins: 20 - - anchors { - top: parent.top - left: parent.left - margins: toolsLoader.margins - } - sourceComponent: tools + bottom: parent.bottom } } - + Image { id: theIcon anchors { bottom: parent.bottom left: parent.left - margins: 5 + margins: bg.margins } source: bg.pageIcon !== "" ? "image://icon/" + bg.pageIcon : "" width: 64 height: width } } diff --git a/plugins/welcomepage/qml/StandardPage.qml b/plugins/welcomepage/qml/StandardPage.qml index f9642cb38..fdd2531d7 100644 --- a/plugins/welcomepage/qml/StandardPage.qml +++ b/plugins/welcomepage/qml/StandardPage.qml @@ -1,38 +1,33 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.1 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.2 -Rectangle { - radius: 5 - color: Qt.rgba(0.8, 0.9, 0.8, 0.4) +GroupBox { + SystemPalette { id: pal } - Image { - anchors { - bottom: parent.bottom - right: parent.right - margins: 5 - } - opacity: 0.3 - width: 128 - height: width - source: "image://icon/kdevelop" + Rectangle { + anchors.fill: parent + + color: pal.base } } diff --git a/plugins/welcomepage/qml/area_code.qml b/plugins/welcomepage/qml/area_code.qml index 686c2e380..41065b44f 100644 --- a/plugins/welcomepage/qml/area_code.qml +++ b/plugins/welcomepage/qml/area_code.qml @@ -1,72 +1,103 @@ /* KDevelop * * Copyright 2011 Aleix Pol * * 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.3 import QtQuick.Layouts 1.2 StandardBackground { id: root state: "develop" tools: ColumnLayout { spacing: 10 - Link { - Layout.fillWidth: true - iconName: "applications-development" - text: i18n("Develop") - onClicked: root.state = "develop" + RowLayout { + Image { + id: icon + Layout.preferredHeight: parent.width/4 + Layout.alignment: Qt.AlignHCenter + horizontalAlignment: Image.AlignHCenter + + sourceSize { + width: icon.height + height: icon.height + } + + source: "image://icon/kdevelop" + smooth: true + fillMode: Image.PreserveAspectFit + } + Heading { + Layout.fillWidth: true + horizontalAlignment: Text.AlignLeft + text: "KDevelop" + scale: 2 + } } - Link { + + Item { Layout.fillWidth: true - iconName: "project-development" - text: i18n("Projects") - onClicked: root.state = "projects" - visible: false //FIXME: removed until it makes sense + Layout.fillHeight: true } - Link { + + GroupBox { Layout.fillWidth: true - iconName: "help-contents" - text: i18n("Getting Started") - onClicked: root.state = "gettingstarted" + flat: true + + ColumnLayout { + Heading { + text: i18n("Need Help?") + } + + Link { + text: i18n("KDevelop.org") + iconName: "applications-webbrowsers" + onClicked: { + Qt.openUrlExternally("https://kdevelop.org") + } + } + Link { + text: i18n("Learn about KDevelop") + iconName: "applications-webbrowsers" + onClicked: Qt.openUrlExternally("https://userbase.kde.org/KDevelop") + } + Link { + text: i18n("Join KDevelop's team!") + iconName: "applications-webbrowsers" + onClicked: Qt.openUrlExternally("https://techbase.kde.org/KDevelop5") + } + Link { + text: i18n("Handbook") + iconName: "applications-webbrowsers" + onClicked: kdev.retrieveMenuAction("help/help_contents").trigger() + } + } } } - Loader { - id: codeContents + Develop { anchors { fill: parent leftMargin: root.marginLeft+root.margins - margins: root.margins } } - states: [ - State { name: "gettingstarted" - PropertyChanges { target: codeContents; source: "qrc:/qml/GettingStarted.qml"} - }, - State { name: "develop" - PropertyChanges { target: codeContents; source: "qrc:/qml/Develop.qml"} - }, - State { name: "projects" - PropertyChanges { target: codeContents; source: "qrc:/qml/ProjectsDashboard.qml"} - } - ] }