Skip to content

Commit

Permalink
added window icon
Browse files Browse the repository at this point in the history
  • Loading branch information
sonodima committed Sep 4, 2024
1 parent d52efdd commit f1b8300
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,6 @@ With the right parameters you can create some cool f\*\*king abstract wallpapers

BlurThing can be helpful, or it can be a fun toy. It's up to you.

## Hotkeys

Some hotkeys are available for faster interaction:

- <kbd>Ctrl</kbd> + <kbd>O</kbd> -> shows the open file dialog
- <kbd>Ctrl</kbd> + <kbd>C</kbd> -> copies the BlurHash to the clipboard
- <kbd>Ctrl</kbd> + <kbd>S</kbd> -> exports the current blurred image to a file
- <kbd>Ctrl</kbd> + <kbd>Z</kbd> -> undo the last modification
- <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Z</kbd> -> redo the last modification

**Note**: On macOS, replace <kbd>Ctrl</kbd> with <kbd>Command</kbd>

## Getting Started

The easiest way to run BlurThing is by using the pre-built binaries available in the
Expand All @@ -60,13 +48,29 @@ The easiest way to run BlurThing is by using the pre-built binaries available in
From there, you want to download the appropriate installer for your operating system
and architecture.

| ![Windows](https://img.shields.io/badge/windows-1f4c7a?style=for-the-badge) | ![macOS](https://img.shields.io/badge/macos-1f4c7a?style=for-the-badge) | ![Linux](https://img.shields.io/badge/linux-1f4c7a?style=for-the-badge) | ![Web](https://img.shields.io/badge/web-1f4c7a?style=for-the-badge) |
| :------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------- | :------------------------------------------------------------------ |
| [x86_64](releases/latest/download/blurthing-x86_64-pc-windows-msvc.msi) - [arm64](releases/latest/download/blurthing-aarch64-pc-windows-msvc.msi) | [arm64](releases/latest/download/blurthing-aarch64-apple-darwin.dmg) - [x86_64](releases/latest/download/blurthing-x86_64-apple-darwin.dmg) | [x86_64](releases/latest/download/blurthing-x86_64-unknown-linux-gnu.AppImage) | [WebAssembly](https://sonodima.github.io/blurthing) |

---

**Note**: If you are using macOS, you may be greeted with a _"BlurThing can't be opened"_
message. This is due to the application currently not being signed.

To open it anyway, you can right-click on the application and select **Open**.

## Hotkeys

Some hotkeys are available for faster interaction:

- <kbd>Ctrl</kbd> + <kbd>O</kbd> -> shows the open file dialog
- <kbd>Ctrl</kbd> + <kbd>C</kbd> -> copies the BlurHash to the clipboard
- <kbd>Ctrl</kbd> + <kbd>S</kbd> -> exports the current blurred image to a file
- <kbd>Ctrl</kbd> + <kbd>Z</kbd> -> undo the last modification
- <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Z</kbd> -> redo the last modification

**Note**: On macOS, replace <kbd>Ctrl</kbd> with <kbd>Command</kbd>

## Build and Run

To compile the main executable, run:
Expand Down
7 changes: 6 additions & 1 deletion blurthing/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![windows_subsystem = "windows"]

use iced::{window, Application, Settings, Size};
use iced::window;
use iced::{Application, Settings, Size};

use application::{BlurThing, PREVIEW_SIZE};

Expand All @@ -12,9 +13,13 @@ mod undo_history;
mod utils;
mod widgets;

const ICON_DATA: &[u8] = include_bytes!("../../assets/icon/[email protected]");

pub fn main() -> iced::Result {
let icon = iced::window::icon::from_file_data(ICON_DATA, None);
let window = window::Settings {
size: Size::new(PREVIEW_SIZE as f32 * 2.0, PREVIEW_SIZE as f32),
icon: icon.ok(),
resizable: false,
..Default::default()
};
Expand Down

0 comments on commit f1b8300

Please sign in to comment.