mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 16:57:00 +01:00
feat(app): bundled Inter and Phosphor icons, window icon
Headings are set in Inter SemiBold, everything else in Inter Regular, so a
title sets the same on every desktop. Media and navigation glyphs (⏭, 🔊, ⛶,
★) come from the Phosphor icon font instead of whichever fallback font had
them. The CJK fallback still loads on its own thread and now joins the
bundled fonts instead of replacing them. The window carries the app icon
on X11 and Windows.
This commit is contained in:
1 parent
6518aef5ee
commit
558446b9e4
17 files changed
+256
-45
No files matched your search
@@ -32,8 +32,15 @@ fn main() -> anyhow::Result<()> {
|
||||
let dirs = AppDirs::ensure().context("resolve app directories")?;
|
||||
|
||||
let window = pstr_app::window::WindowState::load(&dirs.window_file());
|
||||
let mut viewport = egui::ViewportBuilder::default();
|
||||
// X11 and Windows take the icon from the window. Wayland ignores this and
|
||||
// looks the app id up in the installed desktop entry instead.
|
||||
match eframe::icon_data::from_png_bytes(include_bytes!("../assets/icon-256.png")) {
|
||||
Ok(icon) => viewport = viewport.with_icon(icon),
|
||||
Err(error) => tracing::debug!("window icon: {error}"),
|
||||
}
|
||||
let mut options = eframe::NativeOptions {
|
||||
viewport: egui::ViewportBuilder::default()
|
||||
viewport: viewport
|
||||
.with_title("proton-stream")
|
||||
.with_inner_size(window.map_or([1180.0, 780.0], |state| [state.width, state.height]))
|
||||
.with_maximized(window.is_some_and(|state| state.maximized))
|
||||
|
||||
Reference in new issue
Block a user