question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toolbar buttons do not render nicely

See original GitHub issue

Toolbar buttons feel a bit small and toggle buttons do not have a nice look. Defaults should be more pleasing to the eye.

Here is the current toolbar: FlatLafToolBarButtons2

And here is the corresponding test case:

		UIManager.setLookAndFeel(new FlatLightLaf());
		JFrame frame = new JFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JPanel panel = new JPanel();
		JToolBar toolBar = new JToolBar();
		JToggleButton button1 = new JToggleButton(new FlatFileViewFloppyDriveIcon());
		button1.setSelected(true);
		toolBar.add(button1);
		JToggleButton button2 = new JToggleButton(new FlatFileViewComputerIcon());
		button2.setSelected(true);
		toolBar.add(button2);
		JToggleButton button3 = new JToggleButton(new FlatFileViewDirectoryIcon());
		button3.setSelected(true);
		toolBar.add(button3);
		JToggleButton button4 = new JToggleButton(new FlatFileViewHardDriveIcon());
		toolBar.add(button4);
		panel.add(toolBar);
		frame.getContentPane().add(panel);
		frame.setSize(400, 300);
		frame.setVisible(true);

Here is a difference between FlatLaf and Windows L&F: FlatLafToolBarButtons

I think a simple improvement would be for toolbar buttons to have a small empty border around them.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Chrriiscommented, Feb 5, 2020

@smileatom I suggested either a border or empty border. I think empty border would go better with the idea of “flat”.

Here are the same screenshots without and with empty borders: FlatLafToolBarButtons2_b FlatLafToolBarButtons_b

I think buttons are easier to identify, aim at, and it looks less like a gray caterpillar 🙂

0reactions
DevCharlycommented, Feb 16, 2020

released in 0.27

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toolbar buttons not visible with Single Line Code - page 2
Hi Support,. I am using this plugin to display the code on my site however I am having few issues. Let me know...
Read more >
Toolbar [resizable]="true" renders incorrectly with custom ...
The issue here is that the toolbar does not know how to render a custom tool in the overflow popup. We have an...
Read more >
RadEditor toolbar buttons don't work - Telerik
I've a RadEditor that has some functionality issues in IE. Possibly relevant things: It's ContentAreaMode = Div.
Read more >
About Toolbar Controls - Win32 apps | Microsoft Learn
A toolbar is a control that contains one or more buttons.
Read more >
Toolbars - Menus and actions - Human Interface Guidelines
A toolbar provides convenient access to frequently used commands and controls that perform actions relevant to the current view.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found