diff --git a/assets/damus.ico b/assets/damus.ico new file mode 100644 index 00000000..7fb4665b Binary files /dev/null and b/assets/damus.ico differ diff --git a/assets/damus.svg b/assets/damus.svg new file mode 100644 index 00000000..44b3849a --- /dev/null +++ b/assets/damus.svg @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/damus_rounded_256.png b/assets/damus_rounded_256.png new file mode 100644 index 00000000..ec72d00a Binary files /dev/null and b/assets/damus_rounded_256.png differ diff --git a/assets/icon-1024.png b/assets/icon-1024.png deleted file mode 100644 index 1b5868ac..00000000 Binary files a/assets/icon-1024.png and /dev/null differ diff --git a/assets/icon-256.png b/assets/icon-256.png deleted file mode 100644 index ae722873..00000000 Binary files a/assets/icon-256.png and /dev/null differ diff --git a/assets/icon_ios_touch_192.png b/assets/icon_ios_touch_192.png deleted file mode 100644 index 8472802c..00000000 Binary files a/assets/icon_ios_touch_192.png and /dev/null differ diff --git a/assets/maskable_icon_x512.png b/assets/maskable_icon_x512.png deleted file mode 100644 index db8df3e3..00000000 Binary files a/assets/maskable_icon_x512.png and /dev/null differ diff --git a/src/app_creation.rs b/src/app_creation.rs index 02fb3320..80e72562 100644 --- a/src/app_creation.rs +++ b/src/app_creation.rs @@ -14,7 +14,10 @@ pub fn generate_native_options(paths: DataPath) -> NativeOptions { let builder = builder .with_fullsize_content_view(true) .with_titlebar_shown(false) - .with_title_shown(false); + .with_title_shown(false) + .with_icon(std::sync::Arc::new( + eframe::icon_data::from_png_bytes(app_icon()).expect("icon"), + )); if let Some(window_size) = AppSizeHandler::new(&paths).get_app_size() { builder.with_inner_size(window_size) @@ -25,6 +28,9 @@ pub fn generate_native_options(paths: DataPath) -> NativeOptions { eframe::NativeOptions { window_builder: Some(window_builder), + viewport: egui::ViewportBuilder::default().with_icon(std::sync::Arc::new( + eframe::icon_data::from_png_bytes(app_icon()).expect("icon"), + )), ..Default::default() } } @@ -41,6 +47,10 @@ fn generate_native_options_with_builder_modifiers( } } +pub fn app_icon() -> &'static [u8; 192739] { + std::include_bytes!("../assets/damus_rounded_256.png") +} + pub fn generate_mobile_emulator_native_options() -> eframe::NativeOptions { generate_native_options_with_builder_modifiers(|builder| { builder @@ -48,6 +58,7 @@ pub fn generate_mobile_emulator_native_options() -> eframe::NativeOptions { .with_titlebar_shown(false) .with_title_shown(false) .with_inner_size([405.0, 915.0]) + .with_icon(eframe::icon_data::from_png_bytes(app_icon()).expect("icon")) }) }