Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/ActionButton.qml
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.2 | 20 | import QtQuick 2.2 | ||
21 | import org.kde.plasma.core 2.0 as PlasmaCore | 21 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
22 | import org.kde.plasma.components 2.0 as PlasmaComponents | 22 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
23 | 23 | | |||
24 | Item { | 24 | Item { | ||
25 | id: root | 25 | id: root | ||
26 | property alias text: label.text | 26 | property alias text: label.text | ||
27 | property alias iconSource: icon.source | 27 | property alias iconSource: icon.source | ||
28 | property alias containsMouse: mouseArea.containsMouse | 28 | property alias containsMouse: mouseArea.containsMouse | ||
29 | property alias font: label.font | 29 | property alias font: label.font | ||
30 | signal clicked | 30 | signal clicked | ||
Show All 12 Lines | 41 | anchors { | |||
43 | horizontalCenter: parent.horizontalCenter | 43 | horizontalCenter: parent.horizontalCenter | ||
44 | } | 44 | } | ||
45 | width: iconSize | 45 | width: iconSize | ||
46 | height: iconSize | 46 | height: iconSize | ||
47 | 47 | | |||
48 | colorGroup: PlasmaCore.ColorScope.colorGroup | 48 | colorGroup: PlasmaCore.ColorScope.colorGroup | ||
49 | active: mouseArea.containsMouse || root.activeFocus | 49 | active: mouseArea.containsMouse || root.activeFocus | ||
50 | } | 50 | } | ||
51 | PlasmaComponents.Label { | 51 | PlasmaExtras.Heading { | ||
52 | id: label | 52 | id: label | ||
53 | level: 4 | ||||
53 | anchors { | 54 | anchors { | ||
54 | top: icon.bottom | 55 | top: icon.bottom | ||
55 | topMargin: units.smallSpacing | 56 | topMargin: units.smallSpacing | ||
56 | left: parent.left | 57 | left: parent.left | ||
57 | right: parent.right | 58 | right: parent.right | ||
58 | } | 59 | } | ||
59 | horizontalAlignment: Text.AlignHCenter | 60 | horizontalAlignment: Text.AlignHCenter | ||
60 | verticalAlignment: Text.AlignTop | 61 | verticalAlignment: Text.AlignTop | ||
Show All 19 Lines |