Skip to content

Improve icon rendering on macOS - #141

Merged
merv1n34k merged 1 commit into
let-def:mainfrom
merv1n34k:fix/icon-padding
Jul 4, 2026
Merged

Improve icon rendering on macOS#141
merv1n34k merged 1 commit into
let-def:mainfrom
merv1n34k:fix/icon-padding

Conversation

@merv1n34k

@merv1n34k merv1n34k commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Hey!

SDL_SetWindowIcon on macOS scales the bitmap to fill the dock cell, ignoring transparent padding. Only AppIcon.icns loaded via the bundle gets HIG layout.

I have changed the size of the logo and added a target for macOS to create an .app bundle.

Note, that with this PR to render an icon on macOS, one have to run make macos-app and then either open build/TeXpresso.app --args /abs/path.tex or point to build/TeXpresso.app/Contents/MacOS/texpresso. Using build/texpresso... will fallback to default macOS binary icon. Linux/Windows are unaffected.

@let-def

let-def commented Jun 7, 2026

Copy link
Copy Markdown
Owner

This looks good. I see the build script refers to texpresso-luatex, do you have a patch working toward luatex supports?

@merv1n34k

Copy link
Copy Markdown
Collaborator Author

do you have a patch working toward luatex supports?

Yeah, I've been playing in the separate branch to add support for both xetex and luatex. I've called it texpresso-eclipse, but for now it still needs polishing and more I/O wiring, but I think this year it will be ready.

Will remove it from macOS build script for now though.

@merv1n34k
merv1n34k force-pushed the fix/icon-padding branch 2 times, most recently from 88fdac5 to 373ee94 Compare July 4, 2026 16:29
SDL_SetWindowIcon on macOS scales the bitmap to fill the dock cell,
ignoring transparent padding. Only AppIcon.icns loaded via the
bundle gets HIG layout.

- Pad v3.svg viewBox so the artwork is 80% of the canvas.
- Regenerate logo_blob.inc (used as window icon on Linux).
- Skip SDL_SetWindowIcon on Apple so the bundle icon takes effect.
- Add scripts/build-macos-app.sh + `make macos-app` target.

Run `make macos-app`, then `open build/TeXpresso.app --args /abs/path.tex`.
@merv1n34k
merv1n34k merged commit 11017c9 into let-def:main Jul 4, 2026
4 checks passed
@merv1n34k
merv1n34k deleted the fix/icon-padding branch July 4, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants