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..dc23079b5 100644 --- a/plugins/welcomepage/qml/Heading.qml +++ b/plugins/welcomepage/qml/Heading.qml @@ -1,26 +1,28 @@ /* 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 + + height: 2 * implicitHeight + font.pointSize: instance.font.pointSize * 1.3 } diff --git a/plugins/welcomepage/qml/Link.qml b/plugins/welcomepage/qml/Link.qml index 8b1d36a64..f5f65cf17 100644 --- a/plugins/welcomepage/qml/Link.qml +++ b/plugins/welcomepage/qml/Link.qml @@ -1,25 +1,34 @@ /* 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 { +Label { + id: root + + height: 50 + + property string iconName + + signal clicked() } diff --git a/plugins/welcomepage/qml/StandardBackground.qml b/plugins/welcomepage/qml/StandardBackground.qml index c76d5de63..0aefd748e 100644 --- a/plugins/welcomepage/qml/StandardBackground.qml +++ b/plugins/welcomepage/qml/StandardBackground.qml @@ -1,72 +1,73 @@ /* 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 string pageIcon property real marginLeft: toolbar.x+toolbar.width property real margins: 5 - color: pal.base SystemPalette { id: pal } - Rectangle { + Item { id: toolbar - radius: 5 - color: Qt.rgba(0.8, 0.8, 0.8, 0.4) + //radius: 5 + //color: pal.window//Qt.rgba(0.8, 0.8, 0.8, 0.4) 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 } } Image { id: theIcon anchors { bottom: parent.bottom left: parent.left margins: 5 } 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..6a20a5e89 100644 --- a/plugins/welcomepage/qml/StandardPage.qml +++ b/plugins/welcomepage/qml/StandardPage.qml @@ -1,38 +1,45 @@ /* 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 } + + Rectangle { + anchors.fill: parent + + color: pal.base + } Image { anchors { bottom: parent.bottom right: parent.right margins: 5 } opacity: 0.3 - width: 128 + width: 64 height: width source: "image://icon/kdevelop" } } diff --git a/plugins/welcomepage/qml/area_code.qml b/plugins/welcomepage/qml/area_code.qml index 686c2e380..f4c87a8d0 100644 --- a/plugins/welcomepage/qml/area_code.qml +++ b/plugins/welcomepage/qml/area_code.qml @@ -1,72 +1,93 @@ /* 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 { + tools: Column { spacing: 10 - Link { + Button { Layout.fillWidth: true iconName: "applications-development" text: i18n("Develop") + checkable: true + checked: root.state === "develop" onClicked: root.state = "develop" } - Link { - Layout.fillWidth: true - iconName: "project-development" - text: i18n("Projects") - onClicked: root.state = "projects" - visible: false //FIXME: removed until it makes sense - } - Link { - Layout.fillWidth: true - iconName: "help-contents" - text: i18n("Getting Started") - onClicked: root.state = "gettingstarted" + + GroupBox { + flat: true + + ColumnLayout { + Heading { + text: i18n("Need Help?") + } + + Link { + text: i18n("Official Website") + iconName: "applications-webbrowsers" + onClicked: info.state="kdevelop.org" + } + Link { + text: i18n("Userbase") + iconName: "applications-webbrowsers" + onClicked: info.state="userbase" + } + Link { + text: i18n("Techbase") + iconName: "applications-webbrowsers" + onClicked: info.state="techbase" + } + Link { + text: i18n("Handbook") + iconName: "applications-webbrowsers" + onClicked: kdev.retrieveMenuAction("help/help_contents").trigger() + } + } } } Loader { id: codeContents anchors { fill: parent leftMargin: root.marginLeft+root.margins - margins: 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"} } ] }