Adding tab icons reduces the size of the tab and does not show the full icon

I am using Java Scene Builder 2.0 to create a GUI that uses a tab bar. I added an image to each tab so that I can give them icons instead of text. I have set the minimum width and height of the tabs to 100x100 and they will adjust to that size. When I add an image to a tab, I make it the minimum width and height of 100x100, but it shrinks the tab size and only displays part of the icon. This happens when the image has an image and when it doesn't, I don't think it is an image size issue.

From this picture, you can see that the first tab on the left has no image and is the size I want the tabs to be. The second tab has an empty image view and the rest of the tabs have images. I would like the images to be 100x100 and tabbed.

enter image description here

Prefers Java Scene Builder solution, but I also happily accept code solution.

+3


source to share


1 answer


I solved the problem, it was something simple. In the tab layout settings, I changed the minimum height / width to 100x100, but I left the maximum height / width to the default 1.7976931348623157E308. I didn’t notice that the number was so small at first, so I changed it to 200. Images now display better.

enter image description here



enter image description here

+3


source







All Articles