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 icon size in secondary sidebar #194884

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class ActivitybarPart extends Part {
placeholderViewContainersKey: ActivitybarPart.placeholderViewContainersKey,
orientation: ActionsOrientation.VERTICAL,
icon: true,
iconSize: 24,
activityHoverOptions: this.getActivityHoverOptions(),
preventLoopNavigation: true,
recomputeSizes: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
},
fillExtraContextMenuActions: actions => this.fillExtraContextMenuActions(actions),
compositeSize: 0,
iconSize: 16,
overflowActionSize: 44,
colors: theme => ({
activeBackgroundColor: theme.getColor(SIDE_BAR_BACKGROUND),
Expand Down
7 changes: 5 additions & 2 deletions src/vs/workbench/browser/parts/paneCompositeBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface IPaneCompositeBarOptions {
readonly pinnedViewContainersKey: string;
readonly placeholderViewContainersKey: string;
readonly icon: boolean;
readonly iconSize: number;
readonly recomputeSizes: boolean;
readonly orientation: ActionsOrientation;
readonly compositeSize: number;
Expand Down Expand Up @@ -357,9 +358,11 @@ export class PaneCompositeBar extends Disposable {
classNames = [iconId, 'uri-icon'];
createCSSRule(iconClass, `
mask: ${cssUrl} no-repeat 50% 50%;
mask-size: 24px;
mask-size: ${this.options.iconSize}px;
-webkit-mask: ${cssUrl} no-repeat 50% 50%;
-webkit-mask-size: 24px;
-webkit-mask-size: ${this.options.iconSize}px;
mask-origin: padding;
-webkit-mask-origin: padding;
`);
} else if (ThemeIcon.isThemeIcon(icon)) {
classNames = ThemeIcon.asClassNameArray(icon);
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/browser/parts/panel/panelPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class PanelPart extends AbstractPaneCompositePart {
},
fillExtraContextMenuActions: actions => this.fillExtraContextMenuActions(actions),
compositeSize: 0,
iconSize: 16,
overflowActionSize: 44,
colors: theme => ({
activeBackgroundColor: theme.getColor(PANEL_BACKGROUND), // Background color for overflow action
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export class SidebarPart extends AbstractPaneCompositePart {
actions.push(toAction({ id: ToggleSidebarPositionAction.ID, label: ToggleSidebarPositionAction.getLabel(this.layoutService), run: () => this.instantiationService.invokeFunction(accessor => new ToggleSidebarPositionAction().run(accessor)) }));
},
compositeSize: 0,
iconSize: 16,
overflowActionSize: 44,
colors: theme => ({
activeBackgroundColor: theme.getColor(SIDE_BAR_BACKGROUND),
Expand Down