Skip to content

Commit a7a4c11

Browse files
committed
[*] update normally
1 parent 7fbbdc2 commit a7a4c11

File tree

5 files changed

+33
-31
lines changed

5 files changed

+33
-31
lines changed

tr-helper/src/tr.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,14 @@ fn cn() -> &'static HashMap<&'static str, &'static str> {
217217
("Disabled preivew", "禁用预览"),
218218
("Enabled cursor capturing", "启用光标捕获"),
219219
("Enabled preivew", "启用预览"),
220-
("FPS", "帧率"),
221-
("Frame", "总帧"),
222-
("Loss", "损失"),
220+
("fps", "帧率"),
221+
("frames", "总帧"),
222+
("loss", "损失"),
223223
("Merging Tracks", "合并轨道"),
224224
("Merging tracks failed", "合并轨道失败"),
225225
("Merging tracks successfully", "合并轨道成功"),
226226
("Microphone", "麦克风"),
227+
("Output file", "输出文件") ,
227228
("No Found Sources", "未找到源"),
228229
("No found ffmpeg. Download ffmpeg", "未找到ffmpeg。下载ffmpeg"),
229230
("Recorder", "录制设置"),

wayshot/src/logic/tr.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,14 @@ fn cn() -> &'static HashMap<&'static str, &'static str> {
219219
("Disabled preivew", "禁用预览"),
220220
("Enabled cursor capturing", "启用光标捕获"),
221221
("Enabled preivew", "启用预览"),
222-
("FPS", "帧率"),
223-
("Frame", "总帧"),
224-
("Loss", "损失"),
222+
("fps", "帧率"),
223+
("frames", "总帧"),
224+
("loss", "损失"),
225225
("Merging Tracks", "合并轨道"),
226226
("Merging tracks failed", "合并轨道失败"),
227227
("Merging tracks successfully", "合并轨道成功"),
228228
("Microphone", "麦克风"),
229+
("Output file", "输出文件") ,
229230
("No Found Sources", "未找到源"),
230231
("No found ffmpeg. Download ffmpeg", "未找到ffmpeg。下载ffmpeg"),
231232
("Recorder", "录制设置"),

wayshot/ui/panel/desktop/home.slint

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ component PreviewPanel inherits Rectangle {
3636
}
3737

3838
Rectangle {
39-
x: 0;
40-
y: 0;
39+
x: Theme.padding;
40+
y: Theme.padding;
4141
width: stats-vbox.preferred-width;
4242
height: stats-vbox.preferred-height;
4343
background: black;
@@ -49,17 +49,17 @@ component PreviewPanel inherits Rectangle {
4949
padding: Theme.padding * 2;
5050

5151
Label {
52-
text: Logic.tr("FPS") + ": " + Store.stats-info.fps.to-fixed(2);
52+
text: Logic.tr("fps") + ": " + Store.stats-info.fps.to-fixed(2);
5353
color: Theme.light-text-color;
5454
}
5555

5656
Label {
57-
text: Logic.tr("Frame") + ": " + Store.stats-info.total;
57+
text: Logic.tr("frames") + ": " + Store.stats-info.total;
5858
color: Theme.light-text-color;
5959
}
6060

6161
Label {
62-
text: Logic.tr("Loss") + ": " + (Store.stats-info.loss * 100).to-fixed(2) + "%";
62+
text: Logic.tr("loss") + ": " + (Store.stats-info.loss * 100).to-fixed(2) + "%";
6363
color: Theme.light-text-color;
6464
}
6565
}

wayshot/ui/panel/desktop/srouces-dialog.slint

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export component SourcesDialog inherits Dialog {
1515

1616
VerticalLayout {
1717
spacing: Theme.spacing * 4;
18-
height: Theme.default-height * 0.6;
18+
height: Theme.default-height * 0.5;
1919

2020
if Store.audio-sources.length == 0 && Store.video-sources.length == 0: CenterLayout {
2121
NoDataImg {
@@ -24,7 +24,7 @@ export component SourcesDialog inherits Dialog {
2424
}
2525
}
2626

27-
if Store.video-sources.length != 0: VerticalLayout {
27+
if Store.audio-sources.length != 0: VerticalLayout {
2828
Rectangle {
2929
background: Theme.thirdly-background;
3030

@@ -35,23 +35,23 @@ export component SourcesDialog inherits Dialog {
3535

3636
IconBtn {
3737
enabled-toucharea: false;
38-
icon: Icons.screen-fill;
38+
icon: Icons.audio-fill;
3939
show-icon-hover-background: false;
4040
}
4141

4242
SettingDetailLabel {
43-
text: Logic.tr("Screen");
43+
text: Logic.tr("Microphone");
4444
}
4545
}
4646
}
4747

4848
ListView {
49-
for item[index] in Store.video-sources: Rectangle {
50-
background: ta.has-hover ? Theme.checked-background : (Math.mod(index, 2) == 0 ? Theme.table-item-first : Theme.table-item-second);
49+
for item[index] in Store.audio-sources: Rectangle {
50+
background: ta1.has-hover ? Theme.checked-background : (Math.mod(index, 2) == 0 ? Theme.table-item-first : Theme.table-item-second);
5151

52-
ta := TouchArea {
52+
ta1 := TouchArea {
5353
clicked => {
54-
root.selected-screen = item;
54+
root.selected-microphone = item;
5555
}
5656
}
5757

@@ -61,9 +61,9 @@ export component SourcesDialog inherits Dialog {
6161
alignment: start;
6262

6363
RadioBtn {
64-
checked: root.selected-screen == item;
64+
checked: root.selected-microphone == item;
6565
check => {
66-
root.selected-screen = item;
66+
root.selected-microphone = item;
6767
}
6868
}
6969

@@ -76,7 +76,7 @@ export component SourcesDialog inherits Dialog {
7676
}
7777
}
7878

79-
if Store.audio-sources.length != 0: VerticalLayout {
79+
if Store.video-sources.length != 0: VerticalLayout {
8080
Rectangle {
8181
background: Theme.thirdly-background;
8282

@@ -87,23 +87,23 @@ export component SourcesDialog inherits Dialog {
8787

8888
IconBtn {
8989
enabled-toucharea: false;
90-
icon: Icons.audio-fill;
90+
icon: Icons.screen-fill;
9191
show-icon-hover-background: false;
9292
}
9393

9494
SettingDetailLabel {
95-
text: Logic.tr("Microphone");
95+
text: Logic.tr("Screen");
9696
}
9797
}
9898
}
9999

100100
ListView {
101-
for item[index] in Store.audio-sources: Rectangle {
102-
background: ta1.has-hover ? Theme.checked-background : (Math.mod(index, 2) == 0 ? Theme.table-item-first : Theme.table-item-second);
101+
for item[index] in Store.video-sources: Rectangle {
102+
background: ta.has-hover ? Theme.checked-background : (Math.mod(index, 2) == 0 ? Theme.table-item-first : Theme.table-item-second);
103103

104-
ta1 := TouchArea {
104+
ta := TouchArea {
105105
clicked => {
106-
root.selected-microphone = item;
106+
root.selected-screen = item;
107107
}
108108
}
109109

@@ -113,9 +113,9 @@ export component SourcesDialog inherits Dialog {
113113
alignment: start;
114114

115115
RadioBtn {
116-
checked: root.selected-microphone == item;
116+
checked: root.selected-screen == item;
117117
check => {
118-
root.selected-microphone = item;
118+
root.selected-screen = item;
119119
}
120120
}
121121

wayshot/ui/panel/setting/components/recorder.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export component Recorder inherits SettingDetail {
5656

5757
SettingDetailInnerVbox {
5858
SettingDetailLabel {
59-
text: Logic.tr("FPS");
59+
text: Logic.tr("fps");
6060
}
6161

6262
fps-select := Select {

0 commit comments

Comments
 (0)