This button bar has 2 segments. Their icon states are white if inactive and green for all other states. Hover, pressed and focus work fine. Active does not if it is set by calculation.
Instead of going on each layout and select for each which segment should be active I used the "specify" option to put the calculation below (shorten for our needs here) and copied/pasted the button bar on every layout's header part.
Let's assume we are on the List of Projects page. If I click on Segment 2, it goes to the Project details page. Since the name of that layout is Fiche projet the button bar should make Segment 2 active (green). But it does not. If I click on that segment, then it has focus so it is green.
What is wrong with my calc?