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

Left/top scrollbar arrow icons are not properly aligned #329

Closed
Chrriis opened this issue May 20, 2021 · 2 comments
Closed

Left/top scrollbar arrow icons are not properly aligned #329

Chrriis opened this issue May 20, 2021 · 2 comments
Milestone

Comments

@Chrriis
Copy link
Contributor

Chrriis commented May 20, 2021

ScrollBarArrows

The tip of the left/top arrow is 4px from the left/top side while the tip of the right/down arrow is 3px from the right/bottom side. The feeling when looking at it is that the left and top arrows are not properly centered.

My test code:

public static void main(String[] args) throws Exception {
	UIManager.setLookAndFeel(new FlatLightLaf());
	UIManager.put("ScrollBar.showButtons", true);
	UIManager.put("ScrollBar.width", 11);
	UIManager.put("ScrollBar.track", new Color(0xe0e0e0));
	JFrame frame = new JFrame();
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	JPanel centerPane = new JPanel(new BorderLayout());
	centerPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
	JPanel content = new JPanel();
	content.setBackground(Color.WHITE);
	content.setPreferredSize(new Dimension(800, 600));
	JScrollPane scrollPane = new JScrollPane(content);
	centerPane.add(scrollPane);
	frame.getContentPane().add(centerPane);
	frame.setSize(300, 200);
	frame.setVisible(true);
}
@DevCharly
Copy link
Collaborator

I've noticed that also some months ago and worked on a fix, but not yet finished it...

DevCharly added a commit that referenced this issue Jul 1, 2021
DevCharly added a commit that referenced this issue Jul 1, 2021
@DevCharly
Copy link
Collaborator

Fixed in main branch.

@DevCharly DevCharly added this to the 1.3 milestone Jul 1, 2021
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

No branches or pull requests

2 participants