Feedback.qml 3.32 KB
Newer Older
Eike Ziller's avatar
Eike Ziller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/

33
34
import QtQuick 1.0
import components 1.0 as Components
35

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
36
Rectangle {
37
    id: inner_background
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
38
    height: 32
39

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
40
41
42
43
    gradient: Gradient{
        GradientStop{color: "#eee" ; position: 0}
        GradientStop{color: "#bbb" ; position: 1}
    }
44

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
45
46
    Rectangle { color: "#444"; width: parent.width; height: 1; anchors.top: parent.top; anchors.left: parent.left }
    Rectangle { color: "white"; width: parent.width; height: 1; anchors.top: parent.top; anchors.topMargin: 1 ; anchors.left: parent.left }
47
48
49

    // whitelist
    property bool _hasDesktopTheme: welcomeMode.platform() === "linux"
50

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
51
52
53
54
55
56

    Components.Button {
        id: feedbackButton
        text: qsTr("Feedback")
        iconSource: "qrc:welcome/images/feedback_arrow.png"
        anchors.verticalCenter: parent.verticalCenter
57
        anchors.left: parent.left
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
58
59
60
61
62
63
        anchors.margins: 5
        onClicked: welcomeMode.sendFeedback()
    }

    InsetText {
        id: feedbackText
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
64
65
        property bool canShow: parent.width > 630

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
66
        anchors.verticalCenter: parent.verticalCenter
67
        anchors.left: feedbackButton.right
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
68
69
70
        anchors.leftMargin: 10
        anchors.rightMargin: 10
        anchors.margins: 5
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
71
72
73
        opacity: canShow ? 1 : 0
        Behavior on opacity{NumberAnimation{easing.type: Easing.OutSine}}
        width: canShow ? paintedWidth : 0
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
74
75
76
        mainColor: "#444"
        text: qsTr("Help us make Qt Creator even better")
    }
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

    Components.Button {
        id: openProjectButton
        text: qsTr("Open Project...")
        iconSource: _hasDesktopTheme ? "image://desktoptheme/document-open" : ""
        onClicked: welcomeMode.openProject();
        anchors.right: createProjectButton.left
        anchors.margins: 5
        anchors.verticalCenter: parent.verticalCenter
    }

    Components.Button {
        id: createProjectButton
        text: qsTr("Create Project...")
        iconSource: _hasDesktopTheme ? "image://desktoptheme/document-new" : ""
        onClicked: welcomeMode.newProject();
        anchors.right: parent.right
        anchors.margins: 5
        anchors.verticalCenter: parent.verticalCenter
    }
97
}