1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Add icon support to eframe (#193)

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Patrik Höglund
2021-02-26 15:59:30 +01:00
committed by GitHub
parent bdbc59455c
commit a859b2a26e
3 changed files with 28 additions and 0 deletions

View File

@@ -114,6 +114,23 @@ pub trait App {
// NOTE: a bright gray makes the shadows of the windows look weird.
egui::Color32::from_rgb(12, 12, 12).into()
}
/// The application icon, e.g. in the Windows task bar etc.
fn icon_data(&self) -> Option<IconData> {
None
}
}
/// Image data for the icon.
pub struct IconData {
/// RGBA pixels.
pub rgba: Vec<u8>,
/// Image width. This should be a multiple of 4.
pub width: u32,
/// Image height. This should be a multiple of 4.
pub height: u32,
}
/// Represents the surroundings of your app.