Stage2
This commit is contained in:
@@ -2,21 +2,62 @@ export component DemoWindow inherits Window {
|
||||
width: 1920px;
|
||||
height: 480px;
|
||||
|
||||
callback exit;
|
||||
in property <[brush]> bar-colors;
|
||||
in property <string> window-title;
|
||||
in property <int> counter;
|
||||
|
||||
VerticalLayout {
|
||||
Rectangle {
|
||||
height: 60px;
|
||||
background: #2d2d2d;
|
||||
|
||||
Text {
|
||||
text: window-title;
|
||||
color: #ffffff;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
HorizontalLayout {
|
||||
padding-right: 12px;
|
||||
|
||||
HorizontalLayout {
|
||||
horizontal-stretch: 1;
|
||||
alignment: center;
|
||||
|
||||
Text {
|
||||
text: window-title+" (";
|
||||
color: #ffffff;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
|
||||
Text {
|
||||
text: counter+")";
|
||||
color: #ffffff;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
|
||||
Rectangle {
|
||||
width: 70px;
|
||||
height: 40px;
|
||||
background: touch-area.has-hover ? #4a4a4a : #3a3a3a;
|
||||
border-radius: 4px;
|
||||
|
||||
exit-text := Text {
|
||||
text: "Exit";
|
||||
color: touch-area.has-hover ? #000000 : #ffffff;
|
||||
font-weight: 600;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
|
||||
touch-area := TouchArea {
|
||||
clicked => { exit(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +66,7 @@ export component DemoWindow inherits Window {
|
||||
spacing: 0px;
|
||||
|
||||
for color in bar-colors: Rectangle {
|
||||
width: 50px;
|
||||
width: 60px;
|
||||
background: color;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user