feat: custom background image with adjustable opacity #167

Closed
opened 2026-02-25 14:47:07 -08:00 by hikari · 0 comments
Owner

Summary

Allow users to set a custom background image for the entire app, with a slider to control the image's opacity so the UI remains readable.

Proposed UI

In the Settings sidebar, under a new Appearance subsection (or alongside the existing theme controls):

  • Background image: a file picker to select a local image file (PNG, JPG, WebP, etc.)
  • Background opacity: a range slider (0–100%), defaulting to something tasteful like 20–30%
  • A clear button to remove the background image

Implementation Notes

  • Store the image path in HikariConfig (e.g. background_image_path: Option<String>) and the opacity as background_image_opacity: f32 (0.0–1.0)
  • On the frontend, apply the image as a CSS background-image on the root layout element, with background-size: cover and opacity controlled via a CSS variable or inline style
  • The image should sit behind all UI panels — use a fixed/absolute pseudo-element or a dedicated <div> behind the main content so it doesn't interfere with text readability
  • Use the existing Tauri file dialog (dialog::open) to let users browse for the image file
  • The image path should survive app restarts (persisted in config)

Acceptance Criteria

  • User can select a local image file as the app background
  • User can adjust the opacity of that image via a slider
  • User can clear the background image
  • Settings persist across restarts
  • UI remains fully readable at all opacity levels (image is decorative only)
  • Add tests for any new config logic

This issue was created with help from Hikari~ 🌸

## Summary Allow users to set a custom background image for the entire app, with a slider to control the image's opacity so the UI remains readable. ## Proposed UI In the Settings sidebar, under a new **Appearance** subsection (or alongside the existing theme controls): - **Background image**: a file picker to select a local image file (PNG, JPG, WebP, etc.) - **Background opacity**: a range slider (0–100%), defaulting to something tasteful like 20–30% - A **clear** button to remove the background image ## Implementation Notes - Store the image path in `HikariConfig` (e.g. `background_image_path: Option<String>`) and the opacity as `background_image_opacity: f32` (0.0–1.0) - On the frontend, apply the image as a CSS `background-image` on the root layout element, with `background-size: cover` and `opacity` controlled via a CSS variable or inline style - The image should sit behind all UI panels — use a fixed/absolute pseudo-element or a dedicated `<div>` behind the main content so it doesn't interfere with text readability - Use the existing Tauri file dialog (`dialog::open`) to let users browse for the image file - The image path should survive app restarts (persisted in config) ## Acceptance Criteria - [ ] User can select a local image file as the app background - [ ] User can adjust the opacity of that image via a slider - [ ] User can clear the background image - [ ] Settings persist across restarts - [ ] UI remains fully readable at all opacity levels (image is decorative only) - [ ] Add tests for any new config logic ✨ This issue was created with help from Hikari~ 🌸
naomi closed this issue 2026-02-25 22:55:48 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#167