forked from rh-lab-q/confla-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLineButton.qml
More file actions
40 lines (29 loc) · 989 Bytes
/
LineButton.qml
File metadata and controls
40 lines (29 loc) · 989 Bytes
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
33
34
35
36
37
import QtQuick 2.0
import "Theme.js" as Theme
BackgroundItem {
id: lineButton
height: Math.max(innerText.paintedHeight, innerImage.sourceSize.height) + Theme.paddingLarge;
width: parent.width;
anchors.left: parent.left;
anchors.right: parent.right;
property alias text: innerText.text;
property alias image: innerImage.source
Image {
id: innerImage;
anchors.verticalCenter: parent.verticalCenter;
anchors.left: parent.left;
anchors.margins: Theme.paddingLarge
fillMode: Image.PreserveAspectFit
}
Text {
id: innerText
anchors.top: parent.top;
anchors.left: innerImage.right
anchors.right: parent.right
anchors.margins: Theme.paddingLarge
color: lineButton.highlighted ? Theme.primary_color_highlight : Theme.primary_color;
wrapMode: Text.Wrap;
// font.family: Theme.fontFamily
font.pointSize: Theme.secondary_pointSize;
}
}