max-mapper / max-mapper/menubar

The IconTemplate.png overrides my icons when I package my app

Open
#468 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
6.8k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

Description

I have the following code for my simple app:

const { menubar } = require("menubar");
const path = require("path");

const mb = menubar({
	browserWindow: {
		width: 420,
		height: 520,
	},
	icon: path.join(__dirname, "extraResources", "icon.png"),
	tooltip: "Tester",
});

This works perfectly in development, but when I package this with Electron Forge, my tray icon only shows the IconTemplate.png.

Steps to Reproduce the Problem
  1. Use any icon for the tray
  2. Package the app
  3. The icon is using the IconTemplate.png file, not mine.
Expected Behaviour

My icon should appear in "production", not the default.

Specifications
  • Menubar version: latest
  • Platform: Mac + Windows
  • Electron version: v28.2.1
Other information

My app is a plain HTML file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by packaging the sample menubar app with Electron Forge, then inspect how the configured icon and IconTemplate.png are selected in the packaged application. Confirm the fix by checking that the supplied icon, rather than the default template, appears in production on the reported platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.