Ver código fonte

Makes status bar alignment configurable

main
Zack Schuster 7 anos atrás
committed by Eric Amodio
pai
commit
263bdc728a
3 arquivos alterados com 912 adições e 898 exclusões
  1. +906
    -897
      package.json
  2. +5
    -1
      src/blameActiveLineController.ts
  3. +1
    -0
      src/configuration.ts

+ 906
- 897
package.json
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 5
- 1
src/blameActiveLineController.ts Ver arquivo

@ -61,7 +61,11 @@ export class BlameActiveLineController extends Disposable {
if (!Objects.areEquivalent(cfg.statusBar, this._config && this._config.statusBar)) {
changed = true;
if (cfg.statusBar.enabled) {
this._statusBarItem = this._statusBarItem || window.createStatusBarItem(StatusBarAlignment.Right, 1000);
// Coerce invalid configuration to the default right alignment
const useDefaultAlignment = cfg.statusBar.alignment === 'right' || cfg.statusBar.alignment !== 'left';
const alignment = useDefaultAlignment ? StatusBarAlignment.Right : StatusBarAlignment.Left;
this._statusBarItem = this._statusBarItem || window.createStatusBarItem(alignment, 1000);
this._statusBarItem.command = cfg.statusBar.command;
}
else if (!cfg.statusBar.enabled && this._statusBarItem) {

+ 1
- 0
src/configuration.ts Ver arquivo

@ -91,6 +91,7 @@ export interface IStatusBarConfig {
command: StatusBarCommand;
date: 'off' | 'relative' | 'absolute';
dateFormat: string;
alignment: 'left' | 'right';
}
export interface IAdvancedConfig {

Carregando…
Cancelar
Salvar