feat: updated ui libraries

This commit is contained in:
Observer KRypt0n_ 2024-03-24 09:56:04 +02:00
parent 9395750412
commit a1d1950ce8
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
18 changed files with 139 additions and 306 deletions

282
Cargo.lock generated
View file

@ -554,25 +554,24 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0"
[[package]]
name = "cairo-rs"
version = "0.18.3"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f33613627f0dea6a731b0605101fad59ba4f193a52c96c4687728d822605a8a1"
checksum = "2650f66005301bd33cc486dec076e1293c4cecf768bc7ba9bf5d2b1be339b99c"
dependencies = [
"bitflags 2.4.1",
"cairo-sys-rs",
"glib 0.18.4",
"glib",
"libc",
"once_cell",
"thiserror",
]
[[package]]
name = "cairo-sys-rs"
version = "0.18.2"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
checksum = "fd3bb3119664efbd78b5e6c93957447944f16bdbced84c17a9f41c7829b81e64"
dependencies = [
"glib-sys 0.18.1",
"glib-sys",
"libc",
"system-deps",
]
@ -1211,56 +1210,55 @@ dependencies = [
[[package]]
name = "gdk-pixbuf"
version = "0.18.3"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "446f32b74d22c33b7b258d4af4ffde53c2bf96ca2e29abdf1a785fe59bd6c82c"
checksum = "f6a23f8a0b5090494fd04924662d463f8386cc678dd3915015a838c1a3679b92"
dependencies = [
"gdk-pixbuf-sys",
"gio 0.18.4",
"glib 0.18.4",
"gio",
"glib",
"libc",
"once_cell",
]
[[package]]
name = "gdk-pixbuf-sys"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
checksum = "3dcbd04c1b2c4834cc008b4828bc917d062483b88d26effde6342e5622028f96"
dependencies = [
"gio-sys 0.18.1",
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"gio-sys",
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
]
[[package]]
name = "gdk4"
version = "0.7.3"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7edb019ad581f8ecf8ea8e4baa6df7c483a95b5a59be3140be6a9c3b0c632af6"
checksum = "9100b25604183f2fd97f55ef087fae96ab4934d7215118a35303e422688e6e4b"
dependencies = [
"cairo-rs",
"gdk-pixbuf",
"gdk4-sys",
"gio 0.18.4",
"glib 0.18.4",
"gio",
"glib",
"libc",
"pango",
]
[[package]]
name = "gdk4-sys"
version = "0.7.2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbab43f332a3cf1df9974da690b5bb0e26720ed09a228178ce52175372dcfef0"
checksum = "d0b76874c40bb8d1c7d03a7231e23ac75fa577a456cd53af32ec17ec8f121626"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
"gio-sys 0.18.1",
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"gio-sys",
"glib-sys",
"gobject-sys",
"libc",
"pango-sys",
"pkg-config",
@ -1296,25 +1294,6 @@ version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "gio"
version = "0.18.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-util",
"gio-sys 0.18.1",
"glib 0.18.4",
"libc",
"once_cell",
"pin-project-lite",
"smallvec",
"thiserror",
]
[[package]]
name = "gio"
version = "0.19.3"
@ -1325,63 +1304,27 @@ dependencies = [
"futures-core",
"futures-io",
"futures-util",
"gio-sys 0.19.0",
"glib 0.19.3",
"gio-sys",
"glib",
"libc",
"pin-project-lite",
"smallvec",
"thiserror",
]
[[package]]
name = "gio-sys"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
dependencies = [
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"libc",
"system-deps",
"winapi",
]
[[package]]
name = "gio-sys"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcf8e1d9219bb294636753d307b030c1e8a032062cba74f493c431a5c8b81ce4"
dependencies = [
"glib-sys 0.19.0",
"gobject-sys 0.19.0",
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
"windows-sys 0.52.0",
]
[[package]]
name = "glib"
version = "0.18.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "951bbd7fdc5c044ede9f05170f05a3ae9479239c3afdfe2d22d537a3add15c4e"
dependencies = [
"bitflags 2.4.1",
"futures-channel",
"futures-core",
"futures-executor",
"futures-task",
"futures-util",
"gio-sys 0.18.1",
"glib-macros 0.18.3",
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"libc",
"memchr",
"once_cell",
"smallvec",
"thiserror",
]
[[package]]
name = "glib"
version = "0.19.3"
@ -1394,10 +1337,10 @@ dependencies = [
"futures-executor",
"futures-task",
"futures-util",
"gio-sys 0.19.0",
"glib-macros 0.19.3",
"glib-sys 0.19.0",
"gobject-sys 0.19.0",
"gio-sys",
"glib-macros",
"glib-sys",
"gobject-sys",
"libc",
"memchr",
"smallvec",
@ -1410,21 +1353,7 @@ version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "108f374fff60efd14b0d70d8916e7213aed18d7dd071ba3e9334ed2dac1dc86a"
dependencies = [
"gio 0.19.3",
]
[[package]]
name = "glib-macros"
version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72793962ceece3863c2965d7f10c8786323b17c7adea75a515809fa20ab799a5"
dependencies = [
"heck 0.4.1",
"proc-macro-crate 2.0.0",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.43",
"gio",
]
[[package]]
@ -1440,16 +1369,6 @@ dependencies = [
"syn 2.0.43",
]
[[package]]
name = "glib-sys"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
dependencies = [
"libc",
"system-deps",
]
[[package]]
name = "glib-sys"
version = "0.19.0"
@ -1473,46 +1392,35 @@ dependencies = [
"regex-syntax",
]
[[package]]
name = "gobject-sys"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
dependencies = [
"glib-sys 0.18.1",
"libc",
"system-deps",
]
[[package]]
name = "gobject-sys"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c85e2b1080b9418dd0c58b498da3a5c826030343e0ef07bde6a955d28de54979"
dependencies = [
"glib-sys 0.19.0",
"glib-sys",
"libc",
"system-deps",
]
[[package]]
name = "graphene-rs"
version = "0.18.1"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2228cda1505613a7a956cca69076892cfbda84fc2b7a62b94a41a272c0c401"
checksum = "99e4d388e96c5f29e2b2f67045d229ddf826d0a8d6d282f94ed3b34452222c91"
dependencies = [
"glib 0.18.4",
"glib",
"graphene-sys",
"libc",
]
[[package]]
name = "graphene-sys"
version = "0.18.1"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc4144cee8fc8788f2a9b73dc5f1d4e1189d1f95305c4cb7bd9c1af1cfa31f59"
checksum = "236ed66cc9b18d8adf233716f75de803d0bf6fc806f60d14d948974a12e240d0"
dependencies = [
"glib-sys 0.18.1",
"glib-sys",
"libc",
"pkg-config",
"system-deps",
@ -1520,13 +1428,13 @@ dependencies = [
[[package]]
name = "gsk4"
version = "0.7.3"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d958e351d2f210309b32d081c832d7de0aca0b077aa10d88336c6379bd01f7e"
checksum = "c65036fc8f99579e8cb37b12487969b707ab23ec8ab953682ff347cbd15d396e"
dependencies = [
"cairo-rs",
"gdk4",
"glib 0.18.4",
"glib",
"graphene-rs",
"gsk4-sys",
"libc",
@ -1535,14 +1443,14 @@ dependencies = [
[[package]]
name = "gsk4-sys"
version = "0.7.3"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12bd9e3effea989f020e8f1ff3fa3b8c63ba93d43b899c11a118868853a56d55"
checksum = "bd24c814379f9c3199dc53e52253ee8d0f657eae389ab282c330505289d24738"
dependencies = [
"cairo-sys-rs",
"gdk4-sys",
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"glib-sys",
"gobject-sys",
"graphene-sys",
"libc",
"pango-sys",
@ -1551,17 +1459,17 @@ dependencies = [
[[package]]
name = "gtk4"
version = "0.7.3"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aeb51aa3e9728575a053e1f43543cd9992ac2477e1b186ad824fd4adfb70842"
checksum = "aa82753b8c26277e4af1446c70e35b19aad4fb794a7b143859e7eeb9a4025d83"
dependencies = [
"cairo-rs",
"field-offset",
"futures-channel",
"gdk-pixbuf",
"gdk4",
"gio 0.18.4",
"glib 0.18.4",
"gio",
"glib",
"graphene-rs",
"gsk4",
"gtk4-macros",
@ -1572,12 +1480,12 @@ dependencies = [
[[package]]
name = "gtk4-macros"
version = "0.7.2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d57ec49cf9b657f69a05bca8027cff0a8dfd0c49e812be026fc7311f2163832f"
checksum = "40300bf071d2fcd4c94eacc09e84ec6fe73129d2ceb635cf7e55b026b5443567"
dependencies = [
"anyhow",
"proc-macro-crate 1.3.1",
"proc-macro-crate 3.1.0",
"proc-macro-error",
"proc-macro2",
"quote",
@ -1586,16 +1494,16 @@ dependencies = [
[[package]]
name = "gtk4-sys"
version = "0.7.3"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54d8c4aa23638ce9faa2caf7e2a27d4a1295af2155c8e8d28c4d4eeca7a65eb8"
checksum = "0db1b104138f087ccdc81d2c332de5dd049b89de3d384437cc1093b17cd2da18"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
"gdk4-sys",
"gio-sys 0.18.1",
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"gio-sys",
"glib-sys",
"gobject-sys",
"graphene-sys",
"gsk4-sys",
"libc",
@ -1798,14 +1706,14 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libadwaita"
version = "0.5.3"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fe7e70c06507ed10a16cda707f358fbe60fe0dc237498f78c686ade92fd979c"
checksum = "91b4990248b9e1ec5e72094a2ccaea70ec3809f88f6fd52192f2af306b87c5d9"
dependencies = [
"gdk-pixbuf",
"gdk4",
"gio 0.18.4",
"glib 0.18.4",
"gio",
"glib",
"gtk4",
"libadwaita-sys",
"libc",
@ -1814,14 +1722,14 @@ dependencies = [
[[package]]
name = "libadwaita-sys"
version = "0.5.3"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e10aaa38de1d53374f90deeb4535209adc40cc5dba37f9704724169bceec69a"
checksum = "23a748e4e92be1265cd9e93d569c0b5dfc7814107985aa6743d670ab281ea1a8"
dependencies = [
"gdk4-sys",
"gio-sys 0.18.1",
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"gio-sys",
"glib-sys",
"gobject-sys",
"gtk4-sys",
"libc",
"pango-sys",
@ -2129,25 +2037,24 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "pango"
version = "0.18.3"
version = "0.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
checksum = "b1264d13deb823cc652f26cfe59afb1ec4b9db2a5bd27c41b738c879cc1bfaa1"
dependencies = [
"gio 0.18.4",
"glib 0.18.4",
"gio",
"glib",
"libc",
"once_cell",
"pango-sys",
]
[[package]]
name = "pango-sys"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
checksum = "f52ef6a881c19fbfe3b1484df5cad411acaaba29dbec843941c3110d19f340ea"
dependencies = [
"glib-sys 0.18.1",
"gobject-sys 0.18.0",
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
]
@ -2218,9 +2125,9 @@ dependencies = [
[[package]]
name = "pkg-config"
version = "0.3.28"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a"
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
name = "polling"
@ -2264,15 +2171,6 @@ dependencies = [
"toml_edit 0.19.15",
]
[[package]]
name = "proc-macro-crate"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
dependencies = [
"toml_edit 0.20.7",
]
[[package]]
name = "proc-macro-crate"
version = "3.1.0"
@ -2426,11 +2324,10 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "relm4"
version = "0.7.0-beta.2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f505ac255c34dc85b8b189cbc8e12d012765aa9294727c6082e76777e56a50bf"
checksum = "e6e0e187b58db367305e8486d3228158251da1c8ba1e18baa9de61894e822649"
dependencies = [
"async-trait",
"flume 0.11.0",
"fragile",
"futures",
@ -2444,9 +2341,9 @@ dependencies = [
[[package]]
name = "relm4-macros"
version = "0.7.0-beta.2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "086047e49d6426fd9f53109950f205d2ed88027d5fecfece724e6722904fe473"
checksum = "0774e846889823aa5766f5b62cface3189a5b36280e65b2faaa6df0319da1726"
dependencies = [
"proc-macro2",
"quote",
@ -2970,9 +2867,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.35.1"
version = "1.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
dependencies = [
"backtrace",
"bytes",
@ -3018,17 +2915,6 @@ dependencies = [
"winnow",
]
[[package]]
name = "toml_edit"
version = "0.20.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
dependencies = [
"indexmap",
"toml_datetime",
"winnow",
]
[[package]]
name = "toml_edit"
version = "0.21.0"

View file

@ -25,9 +25,9 @@ features = ["all", "genshin"]
# path = "../anime-launcher-sdk" # ! for dev purposes only
[dependencies]
relm4 = { version = "0.7.0-beta.2", features = ["macros", "libadwaita"] }
gtk = { package = "gtk4", version = "0.7.3", features = ["v4_12"] }
adw = { package = "libadwaita", version = "0.5.3", features = ["v1_3"] }
relm4 = { version = "0.8.1", features = ["macros", "libadwaita"] }
gtk = { package = "gtk4", version = "0.8.1", features = ["v4_12"] }
adw = { package = "libadwaita", version = "0.6.0", features = ["v1_4"] }
rfd = { version = "0.14.1", features = ["xdg-portal", "tokio"], default-features = false }
open = "5.0.0"

View file

@ -70,6 +70,36 @@ lazy_static::lazy_static! {
///
/// Standard is `$HOME/.local/share/anime-game-launcher/.first-run`
pub static ref FIRST_RUN_FILE: PathBuf = LAUNCHER_FOLDER.join(".first-run");
/// Global app's css
static ref GLOBAL_CSS: String = format!("
progressbar > text {{
margin-bottom: 4px;
}}
window.classic-style {{
background: url(\"file://{}\");
background-repeat: no-repeat;
background-size: cover;
}}
window.classic-style progressbar {{
background-color: #00000020;
border-radius: 16px;
padding: 8px 16px;
}}
window.classic-style progressbar:hover {{
background-color: #00000060;
color: #ffffff;
transition-duration: 0.5s;
transition-timing-function: linear;
}}
.round-bin {{
border-radius: 24px;
}}
", BACKGROUND_FILE.to_string_lossy());
}
fn main() -> anyhow::Result<()> {
@ -170,36 +200,6 @@ fn main() -> anyhow::Result<()> {
gtk::glib::set_application_name("An Anime Game Launcher");
gtk::glib::set_program_name(Some("An Anime Game Launcher"));
// Set global css
relm4::set_global_css(&format!("
progressbar > text {{
margin-bottom: 4px;
}}
window.classic-style {{
background: url(\"file://{}\");
background-repeat: no-repeat;
background-size: cover;
}}
window.classic-style progressbar {{
background-color: #00000020;
border-radius: 16px;
padding: 8px 16px;
}}
window.classic-style progressbar:hover {{
background-color: #00000060;
color: #ffffff;
transition-duration: 0.5s;
transition-timing-function: linear;
}}
.round-bin {{
border-radius: 24px;
}}
", BACKGROUND_FILE.to_string_lossy()));
// Set UI language
let lang = CONFIG.launcher.language.parse().expect("Wrong language format used in config");
@ -212,6 +212,9 @@ fn main() -> anyhow::Result<()> {
// Create the app
let app = RelmApp::new(APP_ID);
// Set global css
app.set_global_css(&GLOBAL_CSS);
// Show first run window
app.run::<FirstRunApp>(());
}
@ -242,6 +245,9 @@ fn main() -> anyhow::Result<()> {
// Create the app
let app = RelmApp::new(APP_ID);
// Set global css
app.set_global_css(&GLOBAL_CSS);
// Show main window
app.run::<App>(());
}

View file

@ -78,6 +78,7 @@ impl SimpleComponent for AboutDialog {
"한국어 — @project-dy https://github.com/project-dy",
"Indonesia — @yumekarisu https://github.com/yumekarisu",
"Tiếng Việt — Nguyễn Hữu Chánh https://github.com/Chanhnh",
"Українська — Іван Потієнко https://github.com/xxanqw",
"ไทย — @thegooglerider https://github.com/TheGoogleRider2"
].join("\n"),
@ -114,11 +115,7 @@ impl SimpleComponent for AboutDialog {
}
}
fn init(
_init: Self::Init,
root: &Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
fn init(_init: Self::Init, root: Self::Root, sender: ComponentSender<Self>) -> ComponentParts<Self> {
tracing::info!("Initializing about dialog");
let model = Self {

View file

@ -287,11 +287,7 @@ impl SimpleAsyncComponent for DefaultPathsApp {
}
}
async fn init(
init: Self::Init,
root: Self::Root,
_sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
let model = Self {
progress_bar: ProgressBar::builder()
.launch(ProgressBarInit {

View file

@ -135,11 +135,7 @@ impl SimpleAsyncComponent for DependenciesApp {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
_sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
let distro = whatadistro::identify();
let model = Self {

View file

@ -264,11 +264,7 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
let model = Self {
progress_bar: ProgressBar::builder()
.launch(ProgressBarInit {

View file

@ -68,11 +68,7 @@ impl SimpleAsyncComponent for FinishApp {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
_sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
let model = Self;
let widgets = view_output!();

View file

@ -115,11 +115,7 @@ impl SimpleComponent for FirstRunApp {
}
}
fn init(
_parent: Self::Init,
root: &Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
fn init(_parent: Self::Init, root: Self::Root, sender: ComponentSender<Self>) -> ComponentParts<Self> {
tracing::info!("Initializing first run window");
let toast_overlay = adw::ToastOverlay::new();

View file

@ -110,11 +110,7 @@ impl SimpleAsyncComponent for SelectVoiceoversApp {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
_sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
let model = Self {
english: gtk::Switch::new(),
japanese: gtk::Switch::new(),

View file

@ -68,11 +68,7 @@ impl SimpleAsyncComponent for WelcomeApp {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
_sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
let model = Self;
let widgets = view_output!();

View file

@ -625,11 +625,7 @@ impl SimpleComponent for App {
}
}
fn init(
_init: Self::Init,
root: &Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
fn init(_init: Self::Init, root: Self::Root, sender: ComponentSender<Self>) -> ComponentParts<Self> {
tracing::info!("Initializing main window");
let model = App {

View file

@ -36,11 +36,7 @@ impl SimpleComponent for MigrateInstallationApp {
}
}
fn init(
_init: Self::Init,
root: &Self::Root,
_sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
fn init(_init: Self::Init, root: Self::Root, _sender: ComponentSender<Self>) -> ComponentParts<Self> {
tracing::info!("Initializing migration window");
let model = Self {

View file

@ -151,11 +151,7 @@ impl SimpleAsyncComponent for EnvironmentPage {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
tracing::info!("Initializing environment settings");
let mut model = Self {

View file

@ -322,11 +322,7 @@ impl SimpleAsyncComponent for SandboxPage {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
tracing::info!("Initializing sandbox settings");
let mut model = Self {

View file

@ -256,11 +256,7 @@ impl SimpleAsyncComponent for GamescopeApp {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
_sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
tracing::info!("Initializing gamescope settings");
let model = Self;

View file

@ -240,11 +240,7 @@ impl SimpleAsyncComponent for ComponentsPage {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
tracing::info!("Initializing general settings -> components page");
let model = Self {

View file

@ -68,11 +68,7 @@ impl SimpleAsyncComponent for PreferencesApp {
}
}
async fn init(
parent: Self::Init,
root: Self::Root,
sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(parent: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
tracing::info!("Initializing preferences window");
let model = Self {