mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fix icon size issue (#13514)
This commit is contained in:
@@ -124,15 +124,14 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
|||||||
if (this._currentButtonType !== this.buttonType) {
|
if (this._currentButtonType !== this.buttonType) {
|
||||||
this.initButton();
|
this.initButton();
|
||||||
}
|
}
|
||||||
if (this._infoButtonContainer) {
|
if (this._button instanceof InfoButton) {
|
||||||
let button = this._button as InfoButton;
|
this._button.buttonMaxHeight = this.properties.height;
|
||||||
button.buttonMaxHeight = this.properties.height;
|
this._button.buttonMaxWidth = this.properties.width;
|
||||||
button.buttonMaxWidth = this.properties.width;
|
this._button.description = this.properties.description;
|
||||||
button.description = this.properties.description;
|
this._button.iconClass = createIconCssClass(this.properties.iconPath);
|
||||||
button.iconClass = createIconCssClass(this.properties.iconPath);
|
this._button.iconHeight = this.properties.iconHeight;
|
||||||
button.iconHeight = this.properties.iconHeight;
|
this._button.iconWidth = this.properties.iconWidth;
|
||||||
button.iconWidth = this.properties.iconWidth;
|
this._button.title = this.properties.title;
|
||||||
button.title = this.properties.title;
|
|
||||||
} else {
|
} else {
|
||||||
this._button.enabled = this.enabled;
|
this._button.enabled = this.enabled;
|
||||||
this._button.label = this.label;
|
this._button.label = this.label;
|
||||||
@@ -154,6 +153,12 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
|||||||
if (this.height) {
|
if (this.height) {
|
||||||
this._button.setHeight(convertSize(this.height.toString()));
|
this._button.setHeight(convertSize(this.height.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.iconPath) {
|
||||||
|
this._button.element.style.backgroundSize = `${this.getIconWidth()} ${this.getIconHeight()}`;
|
||||||
|
this._button.element.style.paddingLeft = this.getIconWidth();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateIcon();
|
this.updateIcon();
|
||||||
|
|||||||
Reference in New Issue
Block a user