Individual colors on navtabs #3680
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements an option to allow each tab from the
NavigationTabswidget to have its own colors.Here is the use case that drives me to suggest this feature :
I want to be able to use rules to apply a specific color to a tab, depending on the status of the device associated to this tab.
Let's say I manage several power supply units and I want the tab color to show me which one is up, which one is ramping up, which one is in fault.
What it looks like when I'm looking into
Tab0but something happened inTab2:Of course, I also want to know that I'm looking into
Tab0, even when everything goes wrong :So I implemented :
individual_selected_colorindividual_deselected_colorenable_individual_tab_colorsFalse: the usualselected_coloranddeselected_colorare usedTrue: the newindividual_selected_colorandindividual_deselected_colorare usedfalse, avoiding any breaking changeI also changed the name of
tabsattribute and ofsetTabsmethod to clarify the fact that they refer to the tab names.Here is a .bob with various configurations of NavigationTabs that use this feature :
nav_tabs_colors.tar.gz
Let me know if you think such a feature is relevant of if you think this not the right way to implement it.
Checklist
Testing:
Documentation: