Changeset View
Changeset View
Standalone View
Standalone View
sidebar/package/contents/ui/IntroIcon.qml
- This file was copied from sidebar/package/contents/ui/introPage.qml.
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.1 | 19 | import QtQuick 2.1 | ||
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 | ||
21 | import org.kde.kirigami 2.1 as Kirigami | 21 | import org.kde.kirigami 2.1 as Kirigami | ||
22 | 22 | | |||
23 | Rectangle { | 23 | | ||
24 | color: Kirigami.Theme.backgroundColor | 24 | MouseArea { | ||
25 | property alias icon: iconItem.source | ||||
26 | property alias text: label.text | ||||
27 | property string module | ||||
28 | implicitWidth: column.implicitWidth | ||||
29 | implicitHeight: column.implicitHeight | ||||
30 | cursorShape: Qt.PointingHandCursor | ||||
31 | Layout.fillWidth: true | ||||
32 | | ||||
davidedmundson: You're making a custom button, it needs
http://doc.qt.io/qt-5/qml-qtquick-accessible.html… | |||||
33 | onClicked: systemsettings.loadMostUsed(index); | ||||
25 | ColumnLayout { | 34 | ColumnLayout { | ||
26 | anchors { | 35 | id: column | ||
27 | top: parent.top | 36 | anchors.centerIn: parent | ||
28 | bottom: parent.bottom | | |||
29 | horizontalCenter: parent.horizontalCenter | | |||
30 | } | | |||
31 | Item { | | |||
32 | Layout.fillHeight: true | | |||
33 | } | | |||
34 | Kirigami.Icon { | 37 | Kirigami.Icon { | ||
38 | id: iconItem | ||||
35 | Layout.alignment: Qt.AlignHCenter | 39 | Layout.alignment: Qt.AlignHCenter | ||
36 | source: "systemsettings" | 40 | width: Kirigami.Units.iconSizes.huge | ||
37 | width: Kirigami.Units.iconSizes.enormous | | |||
38 | height: width | 41 | height: width | ||
39 | opacity: 0.3 | | |||
40 | } | 42 | } | ||
41 | Kirigami.Label { | 43 | Kirigami.Label { | ||
42 | Layout.alignment: Qt.AlignHCenter | 44 | Layout.alignment: Qt.AlignHCenter | ||
43 | text: i18n("Select an item from the list to see the available options") | 45 | id: label | ||
44 | } | | |||
45 | Item { | | |||
46 | Layout.fillHeight: true | | |||
47 | } | 46 | } | ||
48 | } | 47 | } | ||
49 | } | 48 | } | ||
49 | |
You're making a custom button, it needs
http://doc.qt.io/qt-5/qml-qtquick-accessible.html
stuff