Skip to content

Commit d1e77ac

Browse files
refactor!(core): remove Icon enum and add Image type (#9011)
* refactor!(core): remove `Icon` enum and add `Image` type * clippy * revert api example config change * Update image.rs * fix build * clippy * change files * add back removed methods as setter functions * simplify error message * Update .changes/runtime-icon-lifetime.md * Update .changes/ico-featrue-flags.md * Update core/tauri/src/image.rs * update api lockfile * update api ref * lint --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
1 parent ab060eb commit d1e77ac

File tree

36 files changed

+669
-540
lines changed

36 files changed

+669
-540
lines changed

.changes/ico-featrue-flags.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri': 'major:breaking'
3+
---
4+
5+
Renamed `icon-ico` and `icon-png` feature flags to `image-ico` and `image-png` respectively

.changes/runtime-icon-lifetime.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri-runtime': 'major:breaking'
3+
---
4+
5+
Add a lifetime parameter for `Icon` type. Also changed `rgba` field to be `Cow<'a, [u8]>`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri': 'major:breaking'
3+
---
4+
5+
Removed `Context::default_window_icon_mut` and `Context::tray_icon_mut`, use `Context::set_default_window_icon` and `Context::set_tray_icon` instead. Also changed `Context::set_tray_icon` to accept `Option<T>`.

.changes/tauri-icon-removed.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri': 'major:breaking'
3+
---
4+
5+
Removed `Icon` enum, use the new `Image` type instead. All APIs that previously accepted `Icon` have changed to accept `Image` instead.

.changes/tauri-image-codegen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri-codegen': 'major:breaking'
3+
---
4+
5+
Change the generated context code to use the new `Image` type in tauri.

.changes/tauri-image.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri': 'minor:feat'
3+
---
4+
5+
Add `Image` type.

0 commit comments

Comments
 (0)