fix: 列表改为靠左排列,状态和刷新靠右
This commit is contained in:
+36
-15
@@ -17,17 +17,17 @@ component Hairline inherits Rectangle {
|
||||
component DayBlock inherits VerticalLayout {
|
||||
in property <DayRow> day;
|
||||
width: 100%;
|
||||
padding-left: 28px;
|
||||
padding-right: 28px;
|
||||
padding-top: 18px;
|
||||
padding-bottom: 18px;
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
padding-top: 16px;
|
||||
padding-bottom: 16px;
|
||||
spacing: 8px;
|
||||
alignment: start;
|
||||
|
||||
HorizontalLayout {
|
||||
width: 100%;
|
||||
spacing: 20px;
|
||||
alignment: center;
|
||||
spacing: 16px;
|
||||
alignment: start;
|
||||
|
||||
Text {
|
||||
text: day.date;
|
||||
@@ -35,12 +35,15 @@ component DayBlock inherits VerticalLayout {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
horizontal-alignment: left;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Text {
|
||||
text: day.time;
|
||||
width: 112px;
|
||||
font-size: 13px;
|
||||
color: #6a6a6a;
|
||||
horizontal-alignment: left;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Text {
|
||||
@@ -48,19 +51,26 @@ component DayBlock inherits VerticalLayout {
|
||||
width: 48px;
|
||||
font-size: 13px;
|
||||
color: #6a6a6a;
|
||||
horizontal-alignment: left;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
if day.mark != "": Text {
|
||||
text: day.mark;
|
||||
font-size: 13px;
|
||||
color: #6a6a6a;
|
||||
horizontal-alignment: left;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Rectangle { horizontal-stretch: 1; }
|
||||
Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
min-width: 0px;
|
||||
}
|
||||
Text {
|
||||
text: day.status;
|
||||
min-width: 96px;
|
||||
font-size: 13px;
|
||||
color: day.problem ? #1a1a1a : #6a6a6a;
|
||||
horizontal-alignment: right;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
@@ -100,32 +110,40 @@ export component MainWindow inherits Window {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
spacing: 0;
|
||||
alignment: start;
|
||||
|
||||
HorizontalLayout {
|
||||
width: 100%;
|
||||
height: 56px;
|
||||
padding-left: 28px;
|
||||
padding-right: 28px;
|
||||
spacing: 20px;
|
||||
alignment: center;
|
||||
height: 52px;
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
spacing: 16px;
|
||||
alignment: start;
|
||||
|
||||
Text {
|
||||
text: "打卡";
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
horizontal-alignment: left;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Text {
|
||||
text: root.range;
|
||||
font-size: 13px;
|
||||
color: #8a8a8a;
|
||||
horizontal-alignment: left;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Rectangle { horizontal-stretch: 1; }
|
||||
Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
min-width: 0px;
|
||||
}
|
||||
Text {
|
||||
text: "刷新";
|
||||
font-size: 13px;
|
||||
color: #1a1a1a;
|
||||
horizontal-alignment: right;
|
||||
vertical-alignment: center;
|
||||
TouchArea { clicked => { root.refresh(); } }
|
||||
}
|
||||
@@ -135,7 +153,7 @@ export component MainWindow inherits Window {
|
||||
|
||||
if root.error != "": VerticalLayout {
|
||||
width: 100%;
|
||||
padding: 28px;
|
||||
padding: 24px;
|
||||
alignment: start;
|
||||
Text {
|
||||
text: root.error;
|
||||
@@ -149,12 +167,13 @@ export component MainWindow inherits Window {
|
||||
|
||||
if root.error == "" && root.days.length == 0: VerticalLayout {
|
||||
width: 100%;
|
||||
padding: 28px;
|
||||
padding: 24px;
|
||||
alignment: start;
|
||||
Text {
|
||||
text: "这一周没有打卡记录。";
|
||||
font-size: 14px;
|
||||
color: #8a8a8a;
|
||||
horizontal-alignment: left;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,9 +184,11 @@ export component MainWindow inherits Window {
|
||||
list := VerticalLayout {
|
||||
width: 100%;
|
||||
alignment: start;
|
||||
spacing: 0;
|
||||
for day in root.days: VerticalLayout {
|
||||
width: 100%;
|
||||
spacing: 0;
|
||||
alignment: start;
|
||||
DayBlock { day: day; }
|
||||
Hairline {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user