mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 17:23:20 +00:00
Switch from Qt6 to Slint
This commit is contained in:
parent
f8be14bcf8
commit
63bf267a22
107 changed files with 27532 additions and 2896 deletions
14
ui/Utils.slint
Normal file
14
ui/Utils.slint
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Time } from "std-widgets.slint";
|
||||
|
||||
export global Utils {
|
||||
pure function formatZeroPadding(number: int) -> string {
|
||||
if (number < 10) {
|
||||
return "0\{number}";
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
public pure function timeToString(time: Time) -> string {
|
||||
return "\{formatZeroPadding(time.hour)}h\{formatZeroPadding(time.minute)}";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue