mirror of
https://github.com/pcvolkmer/cert-tools.git
synced 2025-09-13 11:12:52 +00:00
fix: window icon for linux
This commit is contained in:
BIN
resources/icon.png
Normal file
BIN
resources/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
@@ -30,6 +30,7 @@ use iced::{alignment, application, clipboard, color, window, Background, Border,
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
use iced::window::settings::PlatformSpecific;
|
||||||
|
|
||||||
fn main() -> iced::Result {
|
fn main() -> iced::Result {
|
||||||
application(Ui::title, Ui::update, Ui::view)
|
application(Ui::title, Ui::update, Ui::view)
|
||||||
@@ -38,8 +39,17 @@ fn main() -> iced::Result {
|
|||||||
..Settings::default()
|
..Settings::default()
|
||||||
})
|
})
|
||||||
.window(window::Settings {
|
.window(window::Settings {
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
icon: window::icon::from_file_data(include_bytes!("../../resources/icon.ico"), None)
|
icon: window::icon::from_file_data(include_bytes!("../../resources/icon.ico"), None)
|
||||||
.ok(),
|
.ok(),
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
icon: window::icon::from_file_data(include_bytes!("../../resources/icon.png"), None)
|
||||||
|
.ok(),
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
platform_specific: PlatformSpecific {
|
||||||
|
application_id: "cert-tools".to_string(),
|
||||||
|
..PlatformSpecific::default()
|
||||||
|
},
|
||||||
..window::Settings::default()
|
..window::Settings::default()
|
||||||
})
|
})
|
||||||
.resizable(false)
|
.resizable(false)
|
||||||
|
Reference in New Issue
Block a user