Skip to content

Commit

Permalink
Localize preference and address review feedback
Browse files Browse the repository at this point in the history
Remove css classes after hover is disposed.
Update tab bars after preference has been changed.

Contributed on behalf of STMicroelectronics
  • Loading branch information
sgraband committed Mar 29, 2023
1 parent dba6a4d commit cdfee08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/browser/core-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const corePreferenceSchema: PreferenceSchema = {
'window.extendedTabBarPreview': {
type: 'boolean',
default: false,
description: 'Controls whether more information about the tab should be displayed in horizontal tab bars.'
description: nls.localize('theia/core/extendedTabBarPreview', 'Controls whether more information about the tab should be displayed in horizontal tab bars.')
},
'window.menuBarVisibility': {
type: 'string',
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/browser/hover-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export class HoverService {
dispose: () => {
this.lastHidHover = Date.now();
host.classList.remove(updatedPosition);
host.classList.remove(...cssClasses ?? []);
}
});

Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/browser/shell/application-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ export class ApplicationShell extends Widget {
}
});
}

this.corePreferences.onPreferenceChanged(preference => {
if (preference.preferenceName === 'window.extendedTabBarPreview') {
this.allTabBars.forEach(tabBar => {
tabBar.update();
});
}
});
}

protected initializeShell(): void {
Expand Down

0 comments on commit cdfee08

Please sign in to comment.