mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix BDC table icons (#13539)
This commit is contained in:
@@ -369,18 +369,16 @@ export class BdcDashboardOverviewPage extends BdcDashboardPage {
|
||||
});
|
||||
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();
|
||||
copyValueCell.iconPath = IconPathHelper.copy;
|
||||
copyValueCell.onDidClick(() => {
|
||||
vscode.env.clipboard.writeText(e.endpoint);
|
||||
vscode.window.showInformationMessage(loc.copiedEndpoint(getEndpointDisplayText(e.name, e.description)));
|
||||
});
|
||||
copyValueCell.iconHeight = '14px';
|
||||
copyValueCell.iconWidth = '14px';
|
||||
return [getEndpointDisplayText(e.name, e.description),
|
||||
createEndpointComponent(this.modelView.modelBuilder, e, this.model, hyperlinkedEndpoints.some(he => he === e.name)),
|
||||
copyValueCell];
|
||||
return [{ value: getEndpointDisplayText(e.name, e.description) },
|
||||
{ value: createEndpointComponent(this.modelView.modelBuilder, e, this.model, hyperlinkedEndpoints.some(he => he === e.name)) },
|
||||
{ value: copyValueCell }];
|
||||
});
|
||||
|
||||
this.endpointsDisplayContainer.removeItem(this.endpointsLoadingComponent);
|
||||
|
||||
@@ -157,6 +157,10 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
if (this.iconPath) {
|
||||
this._button.element.style.backgroundSize = `${this.getIconWidth()} ${this.getIconHeight()}`;
|
||||
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