Skip to content

Commit

Permalink
[*] update normally
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Aug 27, 2024
1 parent 793260f commit be29e8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ui/appwindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export component AppWindow inherits Window {
width: Math.min(root.width * 0.9, self.vbox-preferred-width * 2);
}

if ToastSetting.text != "": Toast {
if ToastSetting.text != "" && ToastSetting.status != ToastStatus.None: Toast {
x: root.width / 2 - self.width / 2;
y: 50px;
inner-max-width: root.width * 80%;
Expand Down
2 changes: 1 addition & 1 deletion ui/panel/desktop/examples/slider.slint
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export component SliderExample inherits Flickable {
}
}

detail: Store.is-cn ? "默认最小值为0, 默认最多指为100" : "Default minimum value is 0 and maximum value is 100";
detail: Store.is-cn ? "默认最小值为0, 默认最大值为100" : "Default minimum value is 0 and maximum value is 100";

code: "Slider {\n width: 500px;\n height: 20px;\n value: 30;\n minimum: 20;\n maximum: 80;\n changed(value) => {\n debug(value);\n }\n released(value) => {\n debug(value);\n }\n}";
}
Expand Down
10 changes: 5 additions & 5 deletions ui/panel/desktop/examples/toast.slint
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export component ToastExample inherits Flickable {
bg-color: Theme.success-color;
text-color: Colors.white;
colorize: Colors.white;
text: Logic.tr("success");
text: Logic.tr("Success");

clicked() => {
ToastSetting.set("Success Message", ToastStatus.Success);
Util.show-toast("Success Message", ToastStatus.Success);
}
}
}
Expand Down Expand Up @@ -58,7 +58,7 @@ export component ToastExample inherits Flickable {
text: Logic.tr("Danger");

clicked() => {
ToastSetting.set("Danger Message", ToastStatus.Danger);
Util.show-toast("Danger Message", ToastStatus.Danger);
}
}
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export component ToastExample inherits Flickable {
text: Logic.tr("Info");

clicked() => {
ToastSetting.set("Info Message", ToastStatus.Info);
Util.show-toast("Info Message", ToastStatus.Info);
}
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@ export component ToastExample inherits Flickable {
text: Logic.tr("Warning");

clicked() => {
ToastSetting.set("Warning Message", ToastStatus.Warning);
Util.show-toast("Warning Message", ToastStatus.Warning);
}
}
}
Expand Down

0 comments on commit be29e8f

Please sign in to comment.