Debian Codegraph @

src/qml/player/IconButton.qml

raw
1 /*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Renato Araujo Oliveira Filho <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 import QtQuick 2.4
21 import Lomiri.Components 1.3
22
23 AbstractButton {
24 id: root
25
26 property alias iconSource: _image.source
27 property alias iconSize: _image.height
28 property bool leftAlignment: false
29
30 focus: false
31
32 Image {
33 id: _image
34
35 width: height
36 smooth: true
37 anchors {
38 verticalCenter: parent.verticalCenter
39 horizontalCenter: root.leftAlignment ? undefined : parent.horizontalCenter
40 left: root.leftAlignment ? parent.left : undefined
41 }
42 }
43 }