- if ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) {
- // Button with a dark background, use white icon
+ if (
+ // Button with a dark background
+ isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ||
+ // Toolbar with a dark background
+ OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup && ( isActive || element.hasFlag( 'primary' ) )
+ ) {
+ // … use white icon / indicator, regardless of other flags