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

Fix the tab button to show correct tab name #1171

Open
mokun opened this issue Dec 12, 2023 · 2 comments
Open

Fix the tab button to show correct tab name #1171

mokun opened this issue Dec 12, 2023 · 2 comments
Labels

Comments

@mokun
Copy link
Member

mokun commented Dec 12, 2023

Describe the bug
-When clicking on the arrow head tab button on left-bottom of a Unit Window, a pop is supposed to show the names of all tabs.

  • Currently, the popup doesn't show the correct names.
  • Instead, it shows e.g. 18. Tab.

Expected and unexpected behavior

  • It is supposed to show the correct name in the popup

Java classes involved

  • JTabbedPane, TabPanel, UnitWindow
  • In addTabIconPanels() in UnitWindow, we have the following:
	/**
	 * Adds tab panels with icons.
	 */
	protected void addTabIconPanels() {
		tabPanels.forEach(panel -> {
			// Note: if adding panel.getTabTitle() as the first param, it would take up 
			// too much space on the left for displaying the name of each tab
			tabPane.addTab(null, panel.getTabIcon(), panel, panel.getTabToolTip());
		});
	}

Screenshots
image

Specifications

  • pre 3.7.0 build 9075

Additional context

  • This would have applied to all types of Unit Window but only SettlementUnitWindow is affected since it has so many tabs that when they stack up, they exceed the height of the unit window.
  • Q: Should we overwrite JTabbedPane to get our desired UI appearance ? Or go back to simply use a library (e.g. jide-oss) out there that has new custom features for tabs ?
@mokun mokun added the bug label Dec 12, 2023
@mokun
Copy link
Member Author

mokun commented Jan 23, 2024

@bevans2000

Have you noticed this bug ?

@bevans2000
Copy link
Member

We should not use a different library. This is not a massive problem.

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

2 participants