-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTitleLeftBar.qml
55 lines (50 loc) · 1.33 KB
/
TitleLeftBar.qml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import QtQuick 2.0
import QtQuick.Window 2.2
Rectangle {
id: leftbar
property int adaptive_width: Screen.desktopAvailableWidth
property int adaptive_height: Screen.desktopAvailableHeight
width: adaptive_width/2.6
height:adaptive_height/15
color: Qt.rgba(0,0,0,0)
anchors{
left: parent.left
leftMargin: 10
top:parent.top
topMargin: 10
}
signal leftBarClicked
property string titleIcon: "images/wvga/home/header_logo.png"
property string titleName: "hello world"
property real titleIconWidth: 100
property real titleIconHeight: 16
property real titleNameSize: 20
HomeButton{
id: logo
width: titleIconWidth
height: titleIconHeight
anchors{
left: parent.left
top: parent.top
}
label.visible: false
clickable: true
source: titleIcon
onClicked: {
leftBarClicked();
}
}
Text {
id: name
text: titleName
anchors{
left: logo.right
leftMargin: 16
}
horizontalAlignment: Text.AlignHCenter
color: "#dcdde4";
font.family: "Microsoft YaHei";
font.pixelSize: titleNameSize;
wrapMode: Text.Wrap;
}
}