mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
give more flexibility to the dialog width setting (#14570)
* give more flexibility to the dialog width setting * one more place
This commit is contained in:
@@ -68,7 +68,7 @@ export class AssessmentResultsDialog {
|
|||||||
public async openDialog(dialogName?: string) {
|
public async openDialog(dialogName?: string) {
|
||||||
if (!this._isOpen) {
|
if (!this._isOpen) {
|
||||||
this._isOpen = true;
|
this._isOpen = true;
|
||||||
this.dialog = azdata.window.createModelViewDialog(this.title, this.title, true);
|
this.dialog = azdata.window.createModelViewDialog(this.title, this.title, '90%');
|
||||||
|
|
||||||
this.dialog.okButton.label = AssessmentResultsDialog.OkButtonText;
|
this.dialog.okButton.label = AssessmentResultsDialog.OkButtonText;
|
||||||
this.dialog.okButton.onClick(async () => await this.execute());
|
this.dialog.okButton.onClick(async () => await this.execute());
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class WizardController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async createWizard(stateModel: MigrationStateModel): Promise<void> {
|
private async createWizard(stateModel: MigrationStateModel): Promise<void> {
|
||||||
const wizard = azdata.window.createWizard(loc.WIZARD_TITLE, 'wide');
|
const wizard = azdata.window.createWizard(loc.WIZARD_TITLE, 'MigrationWizard', 'wide');
|
||||||
wizard.generateScriptButton.enabled = false;
|
wizard.generateScriptButton.enabled = false;
|
||||||
wizard.generateScriptButton.hidden = true;
|
wizard.generateScriptButton.hidden = true;
|
||||||
const skuRecommendationPage = new SKURecommendationPage(wizard, stateModel);
|
const skuRecommendationPage = new SKURecommendationPage(wizard, stateModel);
|
||||||
|
|||||||
2
src/sql/azdata.proposed.d.ts
vendored
2
src/sql/azdata.proposed.d.ts
vendored
@@ -718,7 +718,7 @@ declare module 'azdata' {
|
|||||||
pageName?: string;
|
pageName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number;
|
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These dialog styles affect how the dialog dispalys in the application.
|
* These dialog styles affect how the dialog dispalys in the application.
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ export interface IModelViewWizardDetails {
|
|||||||
width: DialogWidth;
|
width: DialogWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number;
|
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number | string;
|
||||||
|
|
||||||
export type DialogStyle = 'normal' | 'flyout' | 'callout';
|
export type DialogStyle = 'normal' | 'flyout' | 'callout';
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export interface IModalDialogStyles {
|
|||||||
footerBorderTopColor?: Color;
|
footerBorderTopColor?: Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number;
|
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number | string;
|
||||||
export type DialogStyle = 'normal' | 'flyout' | 'callout';
|
export type DialogStyle = 'normal' | 'flyout' | 'callout';
|
||||||
export type DialogPosition = 'left' | 'below';
|
export type DialogPosition = 'left' | 'below';
|
||||||
|
|
||||||
@@ -223,8 +223,12 @@ export abstract class Modal extends Disposable implements IThemable {
|
|||||||
|
|
||||||
if (typeof this._modalOptions.width === 'number') {
|
if (typeof this._modalOptions.width === 'number') {
|
||||||
this._modalDialog.style.width = `${this._modalOptions.width}px`;
|
this._modalDialog.style.width = `${this._modalOptions.width}px`;
|
||||||
} else {
|
} else if (this._modalOptions.width === 'narrow'
|
||||||
|
|| this._modalOptions.width === 'medium'
|
||||||
|
|| this._modalOptions.width === 'wide') {
|
||||||
this._modalDialog.classList.add(`${this._modalOptions.width}-dialog`);
|
this._modalDialog.classList.add(`${this._modalOptions.width}-dialog`);
|
||||||
|
} else {
|
||||||
|
this._modalDialog.style.width = this._modalOptions.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._modalOptions.dialogStyle === 'callout') {
|
if (this._modalOptions.dialogStyle === 'callout') {
|
||||||
|
|||||||
Reference in New Issue
Block a user