GP-4493 fix GTabPanel to not show borders when no tabs are present

This commit is contained in:
ghidragon 2024-04-09 17:47:12 -04:00
parent cb141a391d
commit f1df4924e8

View file

@ -74,7 +74,6 @@ public class GTabPanel<T> extends JPanel {
this.tabTypeName = tabTypeName;
setLayout(new HorizontalLayout(0));
setFocusable(true);
setBorder(new GTabPanelBorder());
getAccessibleContext().setAccessibleDescription(
"Use left and right arrows to highlight other tabs and press enter to select " +
"the highlighted tab");
@ -491,11 +490,13 @@ public class GTabPanel<T> extends JPanel {
allTabs.clear();
removeAll();
closeTabList();
setBorder(null);
if (!shouldShowTabs()) {
revalidate();
repaint();
return;
}
setBorder(new GTabPanelBorder());
GTab<T> selectedTab = null;
int availableWidth = getPanelWidth();