mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 07:13:45 +01:00
Update src/vs/sessions/contrib/changes/browser/changesView.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1037,8 +1037,17 @@ export class ChangesViewPane extends ViewPane {
|
||||
return { showIcon: true, showLabel: true, isSecondary: false };
|
||||
}
|
||||
|
||||
// Unknown actions (e.g. extension-contributed): icon-only secondary
|
||||
return { showIcon: true, showLabel: false, isSecondary: true };
|
||||
// Unknown actions (e.g. extension-contributed): only hide the label when an icon is present.
|
||||
if (action instanceof MenuItemAction) {
|
||||
const icon = action.item.icon;
|
||||
if (icon) {
|
||||
// Icon-only button (no forced secondary state so primary/secondary can be inferred).
|
||||
return { showIcon: true, showLabel: false };
|
||||
}
|
||||
}
|
||||
|
||||
// Fall back to default button behavior for actions without an icon.
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user