Skip to content

Commit e62a47f

Browse files
committed
[*] update slint to v1.14
1 parent c2aa114 commit e62a47f

File tree

13 files changed

+248
-155
lines changed

13 files changed

+248
-155
lines changed

Cargo.lock

Lines changed: 201 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ paste = "1.0"
4949
bytes = "1.10"
5050
tokio = "1.45"
5151
regex = "1.11"
52-
slint = "1.13"
52+
slint = "1.14"
5353
image = "0.25"
5454
flate2 = "1.1"
5555
anyhow = "1.0"
@@ -64,7 +64,7 @@ webbrowser = "1.0"
6464
serde_with = "3.13"
6565
env_logger = "0.11"
6666
proc-macro2 = "1.0"
67-
slint-build = "1.13"
67+
slint-build = "1.14"
6868
wasm-bindgen = "0.2"
6969
display-info = "0.5"
7070
native-dialog = "0.9"

wayshot/ui/base/audio-control.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export component AudioControl inherits Rectangle {
144144
icon-size: root.icon-size;
145145
bg-color: Theme.base-background;
146146
use-auto-size: true;
147-
icon-rotation-angle: 180deg;
147+
icon-transform-rotation: 180deg;
148148
auto-size-vpadding: root.btn-vpadding;
149149
drop-shadow-blur: root.btn-drop-shadow-blur;
150150
drop-shadow-color: root.btn-drop-shadow-color;

wayshot/ui/base/blank-welcome.slint

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ export component BlankWelcome inherits HorizontalLayout {
1111
in-out property <string> title;
1212
in-out property <string> sub-title;
1313
in-out property <color> text-color: Theme.primary-text-color;
14+
in-out property <float> title-opacity: Theme.blank-welcome-opacity;
15+
in-out property <float> sub-title-opacity: Theme.blank-welcome-opacity;
16+
in-out property <float> img-opacity: Theme.blank-welcome-opacity;
1417

1518
padding: Theme.padding * 2;
1619
padding-top: Theme.padding * 8;
17-
opacity: Theme.blank-welcome-opacity;
1820

1921
VerticalLayout {
2022
alignment: LayoutAlignment.center;
@@ -25,14 +27,16 @@ export component BlankWelcome inherits HorizontalLayout {
2527
font-size: Theme.title1-font-size + 10px;
2628
font-weight: Theme.bold-font-weight;
2729
horizontal-alignment: TextHorizontalAlignment.center;
30+
opacity: root.title-opacity;
2831
color: root.text-color;
2932
}
3033

3134
Label {
3235
text: sub-title;
33-
font-size: Theme.title3-font-size;
36+
font-size: Theme.title4-font-size;
3437
font-weight: Theme.bold-font-weight;
3538
horizontal-alignment: TextHorizontalAlignment.center;
39+
opacity: root.sub-title-opacity;
3640
color: root.text-color;
3741
}
3842

@@ -43,6 +47,7 @@ export component BlankWelcome inherits HorizontalLayout {
4347
Image {
4448
width: Math.min(root.width * 0.8, self.preferred-width);
4549
source: Icons.brand;
50+
opacity: root.img-opacity;
4651
}
4752
}
4853
}

wayshot/ui/base/chartbar.slint

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export component ChartBar inherits Rectangle {
9797
}
9898

9999
Label {
100-
rotation-angle: label-totation-angle;
100+
transform-rotation: label-totation-angle;
101101
text: entry.label;
102102
}
103103
}
@@ -174,7 +174,7 @@ export component ChartBar inherits Rectangle {
174174

175175
for index in number-counts: Label {
176176
x: max-value <= 0 ? -self.preferred-width / 2 : parent.width * self.text.to-float() / max-value - self.preferred-width / 2;
177-
rotation-angle: number-totation-angle;
177+
transform-rotation: number-totation-angle;
178178
text: number-counts <= 1 ? 0 : Math.floor(max-value / (number-counts - 1)) * index;
179179
}
180180
}
@@ -214,7 +214,7 @@ export component ChartBar inherits Rectangle {
214214

215215
for index in number-counts: Label {
216216
y: max-value <= 0 ? parent.height - self.preferred-height / 2 : parent.height - parent.height * self.text.to-float() / max-value - self.preferred-height / 2;
217-
rotation-angle: number-totation-angle;
217+
transform-rotation: number-totation-angle;
218218
text: number-counts <= 1 ? 0 : Math.floor(max-value / (number-counts - 1)) * index;
219219
}
220220
}
@@ -288,8 +288,8 @@ export component ChartBar inherits Rectangle {
288288
}
289289

290290
Label {
291-
rotation-origin-x: 0;
292-
rotation-angle: label-totation-angle;
291+
transform-origin: { x: 0, y: 0 };
292+
transform-rotation: label-totation-angle;
293293
text: entry.label;
294294
}
295295
}

wayshot/ui/base/elevated-btn.slint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export component ElevatedBtn inherits Rectangle {
1414
in-out property colorize <=> btn.colorize;
1515
in-out property enable <=> btn.enabled-toucharea;
1616
out property has-hover <=> btn.has-hover;
17-
in-out property <angle> icon-rotation-angle;
17+
in-out property <angle> icon-transform-rotation;
1818
in-out property gain-focus-when-clicked <=> btn.gain-focus-when-clicked;
1919

2020
in-out property tip <=> btn.tip;
@@ -26,7 +26,7 @@ export component ElevatedBtn inherits Rectangle {
2626
btn := IconBtn {
2727
icon-size: root.width * 0.65;
2828
show-icon-hover-background: false;
29-
icon-rotation-angle: root.icon-rotation-angle;
29+
icon-transform-rotation: root.icon-transform-rotation;
3030
}
3131
}
3232

wayshot/ui/base/icon-btn.slint

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export component IconBtn inherits Rectangle {
1414
in-out property colorize <=> img.colorize;
1515
in-out property icon-size <=> img.width;
1616
in-out property icon-visible <=> img.visible;
17-
in-out property icon-rotation-angle <=> img.rotation-angle;
17+
in-out property icon-transform-rotation <=> img.transform-rotation;
1818
in-out property mouse-cursor <=> touch.mouse-cursor;
1919
in-out property enabled-toucharea <=> touch.enabled;
2020
out property has-hover <=> touch.has-hover;
@@ -96,9 +96,9 @@ export component IconBtn inherits Rectangle {
9696
width: Theme.icon-size;
9797
height: self.width;
9898
colorize: Theme.icon-color;
99-
rotation-angle: 0;
99+
transform-rotation: 0;
100100

101-
animate rotation-angle {
101+
animate transform-rotation {
102102
duration: Theme.default-animate-duration;
103103
easing: ease-in-out;
104104
iteration-count: root.rotation-type == RotationType.Auto ? -1 : root.icon-rotation-iteration-count;
@@ -119,10 +119,10 @@ export component IconBtn inherits Rectangle {
119119
mouse-cursor: MouseCursor.pointer;
120120
clicked => {
121121
if (RotationType.Click == root.rotation-type) {
122-
if (icon-rotation-angle == 0) {
123-
icon-rotation-angle = 360deg;
122+
if (icon-transform-rotation == 0) {
123+
icon-transform-rotation = 360deg;
124124
} else {
125-
icon-rotation-angle = 0deg;
125+
icon-transform-rotation = 0deg;
126126
}
127127
}
128128
if (gain-focus-when-clicked) {

wayshot/ui/base/loading.slint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export component Loading inherits Rectangle {
2929
icon := Image {
3030
height: root.icon-size;
3131
width: self.height;
32-
rotation-angle: !root.is-show-animation ? 0deg : 240deg * animation-tick() / root.duration;
32+
transform-rotation: !root.is-show-animation ? 0deg : 240deg * animation-tick() / root.duration;
3333
source: root.loading-icon;
3434
colorize: root.colorize;
35-
animate rotation-angle {
35+
animate transform-rotation {
3636
easing: ease-in-out;
3737
iteration-count: -1;
3838
}

wayshot/ui/base/setting-entry.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export component SettingEntry inherits Rectangle {
2626
eib := IconBtn {
2727
background: Colors.transparent;
2828
icon: Icons.back-light;
29-
icon-rotation-angle: 180deg;
29+
icon-transform-rotation: 180deg;
3030
colorize: root.background.darker(30%);
3131
is-ltr: false;
3232
}

wayshot/ui/base/tab-btn.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Theme } from "theme.slint";
33
export component TabBtn inherits Rectangle {
44
in-out property icon <=> img.source;
55
in-out property icon-width <=> img.width;
6-
in-out property icon-rotation-angle <=> img.rotation-angle;
6+
in-out property icon-transform-rotation <=> img.transform-rotation;
77
in-out property text <=> txt.text;
88

99
in-out property<length> icon-size: Theme.icon-size;

0 commit comments

Comments
 (0)