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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user