Add rundown converter application icon
This commit is contained in:
parent
db91470e89
commit
624d96d3ba
|
|
@ -3554,6 +3554,7 @@ dependencies = [
|
|||
"tempfile",
|
||||
"unicode-normalization",
|
||||
"uuid",
|
||||
"winresource",
|
||||
"zip",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ eframe = { version = "0.31", optional = true, default-features = false, features
|
|||
rfd = { version = "0.15", optional = true }
|
||||
open = { version = "5", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
winresource = "0.1.17"
|
||||
|
||||
[[bin]]
|
||||
name = "rundown-converter"
|
||||
path = "src/main.rs"
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 364 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,11 @@
|
|||
fn main() {
|
||||
println!("cargo:rerun-if-changed=assets/rundown-converter.ico");
|
||||
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows")
|
||||
&& std::env::var_os("CARGO_FEATURE_DESKTOP").is_some()
|
||||
{
|
||||
winresource::WindowsResource::new()
|
||||
.set_icon("assets/rundown-converter.ico")
|
||||
.compile()
|
||||
.expect("Could not embed the Windows application icon");
|
||||
}
|
||||
}
|
||||
|
|
@ -970,10 +970,14 @@ fn configure_style(ctx: &egui::Context) {
|
|||
ctx.set_style(style);
|
||||
}
|
||||
pub fn launch() -> eframe::Result {
|
||||
let icon =
|
||||
eframe::icon_data::from_png_bytes(include_bytes!("../assets/rundown-converter-icon.png"))
|
||||
.expect("embedded rundown converter icon must be a valid PNG");
|
||||
eframe::run_native(
|
||||
"Rundown converter",
|
||||
eframe::NativeOptions {
|
||||
viewport: egui::ViewportBuilder::default()
|
||||
.with_icon(icon)
|
||||
.with_inner_size([860.0, 620.0])
|
||||
.with_min_inner_size([560.0, 400.0]),
|
||||
..Default::default()
|
||||
|
|
|
|||
Loading…
Reference in New Issue