mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix BDC table icons (#13539)
This commit is contained in:
@@ -369,18 +369,16 @@ export class BdcDashboardOverviewPage extends BdcDashboardPage {
|
|||||||
});
|
});
|
||||||
endpoints.unshift(...sqlServerMasterEndpoints);
|
endpoints.unshift(...sqlServerMasterEndpoints);
|
||||||
|
|
||||||
this.endpointsTable.data = endpoints.map(e => {
|
this.endpointsTable.dataValues = endpoints.map(e => {
|
||||||
const copyValueCell = this.modelView.modelBuilder.button().withProperties<azdata.ButtonProperties>({ title: loc.copy }).component();
|
const copyValueCell = this.modelView.modelBuilder.button().withProperties<azdata.ButtonProperties>({ title: loc.copy }).component();
|
||||||
copyValueCell.iconPath = IconPathHelper.copy;
|
copyValueCell.iconPath = IconPathHelper.copy;
|
||||||
copyValueCell.onDidClick(() => {
|
copyValueCell.onDidClick(() => {
|
||||||
vscode.env.clipboard.writeText(e.endpoint);
|
vscode.env.clipboard.writeText(e.endpoint);
|
||||||
vscode.window.showInformationMessage(loc.copiedEndpoint(getEndpointDisplayText(e.name, e.description)));
|
vscode.window.showInformationMessage(loc.copiedEndpoint(getEndpointDisplayText(e.name, e.description)));
|
||||||
});
|
});
|
||||||
copyValueCell.iconHeight = '14px';
|
return [{ value: getEndpointDisplayText(e.name, e.description) },
|
||||||
copyValueCell.iconWidth = '14px';
|
{ value: createEndpointComponent(this.modelView.modelBuilder, e, this.model, hyperlinkedEndpoints.some(he => he === e.name)) },
|
||||||
return [getEndpointDisplayText(e.name, e.description),
|
{ value: copyValueCell }];
|
||||||
createEndpointComponent(this.modelView.modelBuilder, e, this.model, hyperlinkedEndpoints.some(he => he === e.name)),
|
|
||||||
copyValueCell];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.endpointsDisplayContainer.removeItem(this.endpointsLoadingComponent);
|
this.endpointsDisplayContainer.removeItem(this.endpointsLoadingComponent);
|
||||||
|
|||||||
@@ -157,6 +157,10 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
|||||||
if (this.iconPath) {
|
if (this.iconPath) {
|
||||||
this._button.element.style.backgroundSize = `${this.getIconWidth()} ${this.getIconHeight()}`;
|
this._button.element.style.backgroundSize = `${this.getIconWidth()} ${this.getIconHeight()}`;
|
||||||
this._button.element.style.paddingLeft = this.getIconWidth();
|
this._button.element.style.paddingLeft = this.getIconWidth();
|
||||||
|
// If we have an icon but no specified height then default to the height of the icon so we're sure it fits
|
||||||
|
if (this.height === undefined) {
|
||||||
|
this._button.setHeight(convertSize(this.getIconHeight().toString()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user