summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock115
-rw-r--r--Cargo.toml6
-rw-r--r--crates/iced_fontello/Cargo.toml2
-rw-r--r--fonts/icons.ttfbin6504 -> 6504 bytes
-rw-r--r--src/main.rs26
-rwxr-xr-xsrc/types/rendered_element.rs8
6 files changed, 72 insertions, 85 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b93bffa..72238fb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -593,9 +593,9 @@ checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee"
[[package]]
name = "bytemuck"
-version = "1.23.0"
+version = "1.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c"
+checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422"
dependencies = [
"bytemuck_derive",
]
@@ -775,7 +775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
dependencies = [
"termcolor",
- "unicode-width",
+ "unicode-width 0.1.14",
]
[[package]]
@@ -916,21 +916,6 @@ dependencies = [
]
[[package]]
-name = "crc"
-version = "3.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675"
-dependencies = [
- "crc-catalog",
-]
-
-[[package]]
-name = "crc-catalog"
-version = "2.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
-
-[[package]]
name = "crc32fast"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1360,6 +1345,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d"
dependencies = [
"crc32fast",
+ "libz-rs-sys",
"miniz_oxide",
]
@@ -1618,11 +1604,11 @@ dependencies = [
[[package]]
name = "getopts"
-version = "0.2.21"
+version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+checksum = "cba6ae63eb948698e300f645f87c70f76630d505f23b8907cf1e193ee85048c1"
dependencies = [
- "unicode-width",
+ "unicode-width 0.2.0",
]
[[package]]
@@ -2102,7 +2088,7 @@ dependencies = [
[[package]]
name = "iced_dialog"
version = "0.14.0-dev"
-source = "git+https://github.com/pml68/iced_dialog?branch=iced%2Fpersonal#0f4f9283f733e17facca9299c6e8c0060e1e9cd5"
+source = "git+https://github.com/pml68/iced_dialog?branch=iced%2Fpersonal#4803fe2b5205a5b75994f9c863c04fa7356be714"
dependencies = [
"iced_core",
"iced_widget",
@@ -2618,6 +2604,26 @@ dependencies = [
]
[[package]]
+name = "liblzma"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66352d7a8ac12d4877b6e6ea5a9b7650ee094257dc40889955bea5bc5b08c1d0"
+dependencies = [
+ "liblzma-sys",
+]
+
+[[package]]
+name = "liblzma-sys"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01b9596486f6d60c3bbe644c0e1be1aa6ccc472ad630fe8927b456973d7cb736"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
name = "libm"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2635,6 +2641,15 @@ dependencies = [
]
[[package]]
+name = "libz-rs-sys"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "172a788537a2221661b480fee8dc5f96c580eb34fa88764d3205dc356c7e4221"
+dependencies = [
+ "zlib-rs",
+]
+
+[[package]]
name = "lilt"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2760,27 +2775,6 @@ dependencies = [
]
[[package]]
-name = "lzma-rs"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
-dependencies = [
- "byteorder",
- "crc",
-]
-
-[[package]]
-name = "lzma-sys"
-version = "0.1.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
-dependencies = [
- "cc",
- "libc",
- "pkg-config",
-]
-
-[[package]]
name = "malloc_buf"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5195,6 +5189,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]
+name = "unicode-width"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
+
+[[package]]
name = "unicode-xid"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -6278,15 +6278,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
[[package]]
-name = "xz2"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2"
-dependencies = [
- "lzma-sys",
-]
-
-[[package]]
name = "yansi"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -6484,35 +6475,37 @@ dependencies = [
[[package]]
name = "zip"
-version = "2.4.2"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50"
+checksum = "153a6fff49d264c4babdcfa6b4d534747f520e56e8f0f384f3b808c4b64cc1fd"
dependencies = [
"aes",
"arbitrary",
"bzip2",
"constant_time_eq",
"crc32fast",
- "crossbeam-utils",
"deflate64",
- "displaydoc",
"flate2",
"getrandom 0.3.3",
"hmac",
"indexmap",
- "lzma-rs",
+ "liblzma",
"memchr",
"pbkdf2",
"sha1",
- "thiserror 2.0.12",
"time",
- "xz2",
"zeroize",
"zopfli",
"zstd",
]
[[package]]
+name = "zlib-rs"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "626bd9fa9734751fc50d6060752170984d7053f5a39061f524cda68023d4db8a"
+
+[[package]]
name = "zopfli"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -6569,9 +6562,9 @@ dependencies = [
[[package]]
name = "zune-jpeg"
-version = "0.4.16"
+version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e4a518c0ea2576f4da876349d7f67a7be489297cd77c2cf9e04c2e05fcd3974"
+checksum = "0f6fe2e33d02a98ee64423802e16df3de99c43e5cf5ff983767e1128b394c8ac"
dependencies = [
"zune-core",
]
diff --git a/Cargo.toml b/Cargo.toml
index 79766e1..f3e919d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,10 +10,6 @@ categories = ["gui"]
keywords = ["gui", "ui", "graphics", "interface", "widgets"]
rust-version = "1.85.0"
-[features]
-default = []
-debug = ["iced/debug"]
-
[dependencies]
iced.workspace = true
iced_anim.workspace = true
@@ -44,7 +40,7 @@ toml = "0.8.22"
[workspace.dependencies.iced]
version = "0.14.0-dev"
default-features = false
-features = ["wgpu", "tiny-skia", "web-colors", "auto-detect-theme", "advanced", "tokio", "image", "svg", "lazy"]
+features = ["wgpu", "tiny-skia", "web-colors", "advanced", "tokio", "image", "svg", "lazy"]
[build-dependencies]
iced_fontello = { path = "crates/iced_fontello" }
diff --git a/crates/iced_fontello/Cargo.toml b/crates/iced_fontello/Cargo.toml
index aa9678e..852a608 100644
--- a/crates/iced_fontello/Cargo.toml
+++ b/crates/iced_fontello/Cargo.toml
@@ -15,4 +15,4 @@ sha2 = "0.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
-zip = "2"
+zip = "4"
diff --git a/fonts/icons.ttf b/fonts/icons.ttf
index e1aba57..c00d944 100644
--- a/fonts/icons.ttf
+++ b/fonts/icons.ttf
Binary files differ
diff --git a/src/main.rs b/src/main.rs
index 6be8d5c..eee354d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,7 +28,7 @@ use material_theme::Theme;
use panes::{code_view, designer_view, element_list};
use types::{Action, DesignerPane, Element, Message, Project};
-fn main() -> Result<(), Box<dyn std::error::Error>> {
+fn main() -> iced::Result {
let version = std::env::args()
.nth(1)
.is_some_and(|s| s == "--version" || s == "-V");
@@ -40,21 +40,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
return Ok(());
}
- iced::application(
- IcedBuilder::boot,
- IcedBuilder::update,
- IcedBuilder::view,
- )
- .title(IcedBuilder::title)
- .subscription(IcedBuilder::subscription)
- .theme(IcedBuilder::theme)
- .exit_on_close_request(false)
- .font(icon::FONT)
- .antialiasing(true)
- .centered()
- .run()?;
-
- Ok(())
+ iced::application(IcedBuilder::boot, IcedBuilder::update, IcedBuilder::view)
+ .title(IcedBuilder::title)
+ .subscription(IcedBuilder::subscription)
+ .theme(IcedBuilder::theme)
+ .exit_on_close_request(false)
+ .font(icon::FONT)
+ .antialiasing(true)
+ .centered()
+ .run()
}
struct IcedBuilder {
diff --git a/src/types/rendered_element.rs b/src/types/rendered_element.rs
index a7aecfc..a6618b3 100755
--- a/src/types/rendered_element.rs
+++ b/src/types/rendered_element.rs
@@ -92,7 +92,9 @@ impl RenderedElement {
}
pub fn remove(&mut self, element: &RenderedElement) {
- let parent = self.find_parent(element).unwrap();
+ let Some(parent) = self.find_parent(element) else {
+ return;
+ };
if let Some(child_elements) = parent.child_elements.as_mut() {
if let Some(index) =
child_elements.iter().position(|x| x == element)
@@ -433,7 +435,9 @@ impl<'a: 'b, 'b> Action<'a> {
_ => ids.last().unwrap(),
};
let mut element_tree = element_tree.unwrap().clone();
- let element = element_tree.find_by_id(id).unwrap();
+ let Some(element) = element_tree.find_by_id(id) else {
+ return Action::Stop;
+ };
// Element is a parent and isn't a non-empty container
if (element.is_empty() || !(element.name == ElementName::Container))