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