Skip to content

Commit

Permalink
Add program icon for Windows (#51)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Wang <[email protected]>
  • Loading branch information
harrynull and HITGIF authored Feb 5, 2024
1 parent 242f98a commit fe6db9a
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
third_party
*.exe
*.dmg
.idea/
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

97 changes: 63 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion mira-manifest.rc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define RT_MANIFEST 24
1 RT_MANIFEST "mira_sharer.exe.manifest"
1 RT_MANIFEST "mira_sharer.exe.manifest"
MAINICON ICON "resources/icons/mira.ico"
1 change: 1 addition & 0 deletions mira_sharer.iml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/third_party" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
Binary file added resources/icons/mira.ico
Binary file not shown.
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![windows_subsystem = "windows"]

extern crate core;
#[macro_use]
extern crate log;
Expand Down Expand Up @@ -45,6 +47,13 @@ async fn main() {
window: iced::window::Settings {
size: (640, 373),
min_size: Some((400, 300)),
icon: Some(
iced::window::icon::from_file_data(
include_bytes!("../resources/icons/256x256.png"),
None,
)
.unwrap(),
),
..Default::default()
},
..Default::default()
Expand Down

0 comments on commit fe6db9a

Please sign in to comment.