diff --git a/plugins/welcomepage/qml/Heading.qml b/plugins/welcomepage/qml/Heading.qml index dc23079b5d..96e5caaa5a 100644 --- a/plugins/welcomepage/qml/Heading.qml +++ b/plugins/welcomepage/qml/Heading.qml @@ -1,28 +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 } + property real scale: 1.4 height: 2 * implicitHeight - font.pointSize: instance.font.pointSize * 1.3 + font.pointSize: instance.font.pointSize * scale } diff --git a/plugins/welcomepage/qml/Link.qml b/plugins/welcomepage/qml/Link.qml index f5f65cf174..0a3fa05d83 100644 --- a/plugins/welcomepage/qml/Link.qml +++ b/plugins/welcomepage/qml/Link.qml @@ -1,34 +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 -Label { - id: root - - height: 50 - - property string iconName - - signal clicked() +ToolButton { } diff --git a/plugins/welcomepage/qml/StandardBackground.qml b/plugins/welcomepage/qml/StandardBackground.qml index 0aefd748ea..cae39be477 100644 --- a/plugins/welcomepage/qml/StandardBackground.qml +++ b/plugins/welcomepage/qml/StandardBackground.qml @@ -1,73 +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 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 - SystemPalette { id: pal } - - Item { - id: toolbar + Loader { + id: toolsLoader - //radius: 5 - //color: pal.window//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 6a20a5e89b..fdd2531d77 100644 --- a/plugins/welcomepage/qml/StandardPage.qml +++ b/plugins/welcomepage/qml/StandardPage.qml @@ -1,45 +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 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: 64 - height: width - source: "image://icon/kdevelop" - } } diff --git a/plugins/welcomepage/qml/area_code.qml b/plugins/welcomepage/qml/area_code.qml index f4c87a8d04..41065b44f5 100644 --- a/plugins/welcomepage/qml/area_code.qml +++ b/plugins/welcomepage/qml/area_code.qml @@ -1,93 +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: Column { + tools: ColumnLayout { spacing: 10 - Button { + 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 + } + } + + Item { Layout.fillWidth: true - iconName: "applications-development" - text: i18n("Develop") - checkable: true - checked: root.state === "develop" - onClicked: root.state = "develop" + Layout.fillHeight: true } GroupBox { + Layout.fillWidth: true flat: true ColumnLayout { Heading { text: i18n("Need Help?") } Link { - text: i18n("Official Website") + text: i18n("KDevelop.org") iconName: "applications-webbrowsers" - onClicked: info.state="kdevelop.org" + onClicked: { + Qt.openUrlExternally("https://kdevelop.org") + } } Link { - text: i18n("Userbase") + text: i18n("Learn about KDevelop") iconName: "applications-webbrowsers" - onClicked: info.state="userbase" + onClicked: Qt.openUrlExternally("https://userbase.kde.org/KDevelop") } Link { - text: i18n("Techbase") + text: i18n("Join KDevelop's team!") iconName: "applications-webbrowsers" - onClicked: info.state="techbase" + 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"} - } - ] }