summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-06-07 10:07:12 +0200
committerpml68 <contact@pml68.dev>2025-06-07 10:08:03 +0200
commitbb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5 (patch)
tree9c62153f5508b0ac7d0b4c3fbb913423e4e03a69 /src/main.rs
parentchore: update dependencies (diff)
downloadiced-builder-bb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5.tar.gz
fix: animated theme change on startup when config theme != "Dark"
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 508b791..4d8c351 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -148,10 +148,10 @@ impl IcedBuilder {
Message::ConfigLoad(result) => match result {
Ok(config) => {
self.config = Arc::new(config);
- self.theme.update(self.config.selected_theme().into());
+ self.theme.settle_at(self.config.selected_theme());
- return if let Some(path) = self.config.last_project() {
- if path.exists() && path.is_file() {
+ if let Some(path) = self.config.last_project() {
+ return if path.exists() && path.is_file() {
Task::perform(
Project::from_path(path.to_owned()),
Message::FileOpened,
@@ -161,9 +161,7 @@ impl IcedBuilder {
"The file {} does not exist, or isn't a file.",
path.to_string_lossy()
))
- }
- } else {
- Task::none()
+ };
};
}
Err(error) => return error_dialog(error),