Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 'Report a bug' in Menu sometimes has icon, most often it doesn't #1178

Open
1 task done
pskowronek opened this issue May 7, 2024 · 1 comment
Open
1 task done
Labels

Comments

@pskowronek
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues (including the closed ones)

Description

Report a bug' in Menu sometimes has icon, most often it doesn't.

Very strange :)

Steps to reproduce

Open muCommander and navigate to Menu -> Help - observe whether 'Rpeort a bug' has an icon.
Re-launch muCommander a couple of times - sometimes it has it, sometimes not - most often it doesn't have it.

Expected behavior

Consistent display of that icon.

Actual behavior

Randomness.

Screenshots?

It is when it has it:
mc_icon_bug

muCommander version

1.4.0, in 1.3.0 I don't see this icon either.

Java version

as provided by DMG

Operating System type and version

macOS Ventura (OCLP)

Relevant log output

No response

@pskowronek
Copy link
Member Author

pskowronek commented May 9, 2024

This is caused by Menu item and Tool bar items being loaded in simultaneously in parallel here:

executor.execute(() -> {
this.toolbar = new ToolBar(this);
this.toolbarPanel = ToolbarMoreButton.wrapToolBar(toolbar);
this.toolbarPanel.setVisible(MuConfigurations.getPreferences().getVariable(MuPreference.TOOLBAR_VISIBLE, MuPreferences.DEFAULT_TOOLBAR_VISIBLE));
contentPane.add(toolbarPanel, BorderLayout.NORTH);
});
executor.execute(() -> {
// Create menu bar (has to be created after toolbar) - ok, but why?
MainMenuBar menuBar = new MainMenuBar(this);
getJFrame().setJMenuBar(menuBar);
});

The following line nullifies icons in Menu, but apparently it can be overridden by Toolbar loading thread (still I'm not sure how/why tho...):


When this line is commented out, then Menu contains pretty nice icons in the menu - the question is whether such UX we would like to have:

obraz

obraz

pskowronek added a commit to pskowronek/mucommander-for-pr that referenced this issue May 9, 2024
pskowronek added a commit to pskowronek/mucommander-for-pr that referenced this issue May 14, 2024
pskowronek added a commit to pskowronek/mucommander-for-pr that referenced this issue May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant