mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
fix theming issue for manage account status bar icon (#396)
This commit is contained in:
committed by
Karl Burtram
parent
da75681f83
commit
874b242944
@@ -7,25 +7,35 @@
|
||||
|
||||
import 'vs/css!./media/accountListStatusbarItem';
|
||||
import { Action, IAction } from 'vs/base/common/actions';
|
||||
import { combinedDisposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { $, append } from 'vs/base/browser/dom';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IStatusbarItem } from 'vs/workbench/browser/parts/statusbar/statusbar';
|
||||
import { Themable, STATUS_BAR_FOREGROUND } from 'vs/workbench/common/theme';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||
|
||||
export class AccountListStatusbarItem implements IStatusbarItem {
|
||||
private _toDispose: IDisposable[];
|
||||
export class AccountListStatusbarItem extends Themable implements IStatusbarItem {
|
||||
private _manageLinkedAccountAction: IAction;
|
||||
private _icon: HTMLElement;
|
||||
|
||||
constructor(
|
||||
@IInstantiationService private _instantiationService: IInstantiationService,
|
||||
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
||||
@IAccountManagementService private _accountManagementService: IAccountManagementService,
|
||||
@IThemeService themeService: IThemeService
|
||||
) {
|
||||
this._toDispose = [];
|
||||
super(themeService);
|
||||
}
|
||||
|
||||
protected updateStyles(): void {
|
||||
super.updateStyles();
|
||||
if (this._icon) {
|
||||
this._icon.style.backgroundColor = this.getColor(STATUS_BAR_FOREGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
public render(container: HTMLElement): IDisposable {
|
||||
@@ -34,9 +44,11 @@ export class AccountListStatusbarItem implements IStatusbarItem {
|
||||
const accountElement = append(rootElement, $('a.linked-account-status-selection'));
|
||||
accountElement.title = ManageLinkedAccountAction.LABEL;
|
||||
accountElement.onclick = () => this._onClick();
|
||||
append(accountElement, $('.linked-account-icon'));
|
||||
this._icon = append(accountElement, $('.linked-account-icon'));
|
||||
|
||||
return combinedDisposable(this._toDispose);
|
||||
this.updateStyles();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private _onClick() {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
.statusbar-item .linked-account-staus a.linked-account-status-selection .linked-account-icon {
|
||||
-webkit-mask: url('accounts_statusbar_inverse.svg') no-repeat 50% 50%;
|
||||
-webkit-mask-size: 12px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
width: 12px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user