Skip to content

Commit 8026acc

Browse files
committed
[*] refactor: video-editor
1 parent dbd08c8 commit 8026acc

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

wayshot/ui/desktop-window.slint

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import {
1919
import { DesktopPanel } from "panel/desktop/desktop.slint";
2020

2121
export component AppWindow inherits Window {
22-
width: Theme.default-width;
23-
height: Theme.default-height;
24-
// preferred-width: Theme.default-width;
25-
// preferred-height: Theme.default-height;
22+
// width: Theme.default-width;
23+
// height: Theme.default-height;
24+
preferred-width: Theme.default-width;
25+
preferred-height: Theme.default-height;
2626
default-font-size: Theme.default-font-size;
2727
default-font-weight: Theme.normal-font-weight;
2828
default-font-family: Theme.default-font-family;

wayshot/ui/panel/desktop/video-editor/left-panel/left-panel.slint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export component LeftPanel inherits Rectangle {
3737

3838
hbox := HorizontalLayout {
3939
alignment: LayoutAlignment.center;
40+
padding-right: Theme.padding;
4041

4142
TabBtns {
4243
items: [

wayshot/ui/panel/desktop/video-editor/preview.slint

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export component PreviewWindow inherits Rectangle {
147147

148148
component ProcessTime inherits VerticalLayout {
149149
alignment: center;
150+
padding-left: Theme.padding * 2;
150151

151152
HorizontalLayout {
152153
spacing: Theme.spacing * 2;
@@ -187,6 +188,7 @@ component Volume inherits HorizontalLayout {
187188

188189
AudioLevel {
189190
height: parent.height;
191+
width: 250px;
190192
db: Store.video-editor-preview-volume.left;
191193
enable: Store.setting-control.enable-audio;
192194
}
@@ -204,6 +206,7 @@ component Volume inherits HorizontalLayout {
204206

205207
AudioLevel {
206208
height: root.height / 3;
209+
width: 250px;
207210
db: Store.video-editor-preview-volume.right;
208211
enable: Store.setting-control.enable-audio;
209212
}
@@ -235,10 +238,9 @@ export component Preview inherits Rectangle {
235238
HorizontalLayout {
236239
alignment: end;
237240
height: hbox.preferred-height * 0.8;
241+
padding-right: Theme.padding * 2;
238242

239-
Volume {
240-
width: min(250px, root.width * 0.25);
241-
}
243+
Volume { }
242244
}
243245
}
244246
}

wayshot/ui/panel/desktop/video-editor/right-panel/filter/filter.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ component SegmentFilterList inherits Rectangle {
119119

120120
border-radius: Theme.border-radius;
121121
border-width: Theme.default-border-width;
122-
border-color: Theme.thirdly-background;
122+
border-color: Theme.base-border-color;
123123
clip: true;
124124

125125
VerticalLayout {

wayshot/ui/panel/desktop/video-editor/right-panel/subtitle.slint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ component SubtitleBody inherits Flickable {
6161

6262
VerticalLayout {
6363
spacing: Theme.spacing * 2;
64+
alignment: start;
6465

6566
VerticalLayout {
6667
alignment: start;
@@ -129,6 +130,7 @@ component SubtitleBody inherits Flickable {
129130
te := TxtEdit {
130131
placeholder: Logic.tr("Input subtitle");
131132
text: checked-index == 0 ? "" : edited-subtitle.subtitle;
133+
height: Theme.default-font-size * 10;
132134
}
133135

134136
HorizontalLayout {

wayshot/ui/panel/desktop/video-editor/tracks/tracks.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export component Tracks inherits Rectangle {
178178
}
179179
}
180180

181-
Divider {
181+
divider := Divider {
182182
x: tlvbox.x + tl.track-header-width;
183183
y: tlvbox.y;
184184
width: Theme.default-border-width;

wayshot/ui/panel/desktop/video-editor/video-editor.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ component Body inherits Rectangle {
6767

6868
export component VideoEditor inherits Rectangle {
6969
fs-timer := Timer {
70-
interval: 1s;
70+
interval: 200ms;
7171
running: true;
7272

7373
triggered() => {

0 commit comments

Comments
 (0)