mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 17:23:25 -05:00
Connection error box style fix (#14469)
* Modified modal styles, limiting height of basic modal to 480px. * wip - added new attachCalloutDialogStyler. Moved callout-specific styler code out of modal.ts * Moved attach styler code to workbench/common. Added custom styles to imageCalloutDialog * Moved styler code into calloutDialog. Added callout-specific theme colors to colorRegistry. Removed color styles from modal and callout stylesheets. * Added CalloutDialogModal that extends CalloutDialog so that the callout can be instantiated from core. Revised calloutDialog so the position cn be passed in from where it is instantiated. * Revised refactor of modal and image/link callouts so that callout dialog invoked by core can also use the styler. Removed unused properties from dialog code. * Added conditional to dialogModal to use correct styler for callouts. * Cleaned up styles. Modified custom colors. * Wrapped call to positionCalloutDialog in conditional. * Style, colors, styler and modal updates to align callout with latest OPAC toolkit styles. * Moved calloutDialog stylesheet * Consolidated styler code and added a flexible custom styler to provide values for dialogModal * Added image callout code. * Remove image callout dialog until wired fully * Test fixes Co-authored-by: chlafreniere <hichise@gmail.com>
This commit is contained in:
@@ -22,8 +22,8 @@ export class CustomDialogService {
|
||||
let name = dialogName ? dialogName : 'CustomDialog';
|
||||
|
||||
if (options && (options.dialogStyle === 'callout')) {
|
||||
options.positionX = document.activeElement.getBoundingClientRect().left;
|
||||
options.positionY = document.activeElement.getBoundingClientRect().top;
|
||||
options.dialogProperties.xPos = document.activeElement.getBoundingClientRect().left;
|
||||
options.dialogProperties.yPos = document.activeElement.getBoundingClientRect().top;
|
||||
options.renderFooter = false;
|
||||
}
|
||||
let dialogModal = this._instantiationService.createInstance(DialogModal, dialog, name, options || DefaultDialogOptions);
|
||||
|
||||
@@ -23,7 +23,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
|
||||
import { attachCustomDialogStyler } from 'sql/workbench/common/styler';
|
||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
|
||||
export class DialogModal extends Modal {
|
||||
@@ -56,7 +56,7 @@ export class DialogModal extends Modal {
|
||||
|
||||
public render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
attachCustomDialogStyler(this, this._themeService, this._modalOptions.dialogStyle);
|
||||
|
||||
if (this._modalOptions.renderFooter !== false) {
|
||||
this._modalOptions.renderFooter = true;
|
||||
|
||||
Reference in New Issue
Block a user