Adding zoom button (#18407)

* Adding zoom button

* Fixing string
This commit is contained in:
Aasim Khan
2022-02-16 15:26:14 -08:00
committed by GitHub
parent fe360afec7
commit 81e8eb9a82
2 changed files with 12 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ However we always want it to be the width of the container it is resizing.
flex-direction: row;
padding: 5px;
height: auto;
width: 180px;
width: 240px;
}
/* query plan header that contains the relative query cost, query statement and recommendations */

View File

@@ -16,6 +16,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { zoomIconClassNames } from 'sql/workbench/contrib/queryplan2/browser/constants';
import { Button } from 'sql/base/browser/ui/button/button';
export class CustomZoomWidget extends QueryPlanWidgetBase {
private _actionBar: ActionBar;
@@ -53,10 +54,19 @@ export class CustomZoomWidget extends QueryPlanWidgetBase {
}
};
const applyButton = new Button(this.container, {
title: localize('customZoomApplyButtonTitle', "Apply Zoom (Enter)")
});
applyButton.setWidth('60px');
applyButton.label = localize('customZoomApplyButton', "Apply");
applyButton.onDidClick(async e => {
await new CustomZoomAction().run(self);
});
// Adding action bar
this._actionBar = new ActionBar(this.container);
this._actionBar.context = this;
this._actionBar.pushAction(new CustomZoomAction(), { label: false, icon: true });
this._actionBar.pushAction(new CancelZoom(), { label: false, icon: true });
}