Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
timtmok committed Apr 1, 2024
1 parent 84dcbd8 commit b7fa5e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 deletions.
8 changes: 0 additions & 8 deletions src/vs/workbench/common/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1612,14 +1612,6 @@ export const POSITRON_MODAL_DIALOG_CHECKBOX_BORDER = registerColor('positronModa
hcLight: checkboxBorder
}, localize('positronModalDialog.checkboxBorder', "Positron modal dialog checkbox border."));

// Positron modal dialog form border color.
export const POSITRON_MODAL_DIALOG_FORM_BORDER = registerColor('positronModalDialog.formBorder', {
dark: '#292f32',
light: '#a6a6a6',
hcDark: foreground,
hcLight: foreground
}, localize('positronModalDialog.formBorder', "Positron modal dialog form border."));

// < --- Positron Drop Down --- > shit

// Positron drop down border color.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ const browsePlaceholderText = localize('positronSavePlotModalDialogBrowsePlaceho

/**
* Show the save plot modal dialog for dynamic plots.
* @param props SavePlotModalDialogProps to set the size and the plot client
* @returns The requested size and path to save the plot.
* @param layoutService the layout service for the modal
* @param keybindingService the keybinding service to intercept shortcuts
* @param fileDialogService the file dialog service to prompt where to save the plot
* @param plotClient the dynamic plot client to render previews and the final image
* @param savePlotCallback the action to take when the dialog closes
* @param suggestedPath the pre-filled save path
*/
export const showSavePlotModalDialog = async (
layoutService: IWorkbenchLayoutService,
Expand Down Expand Up @@ -238,7 +242,7 @@ const SavePlotModalDialog = (props: SavePlotModalDialogProps) => {
</div>
<div className='plot-preview-image-container preview'>
{(uri &&
<img className='plot-preview' src={uri} />)
<img className='plot-preview' src={uri} alt={props.plotClient.metadata.code} />)
}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@ export interface PlotResult {

}

/**
* A saved plot's path
*/
export interface SavedPlot {
/**
* The plot path
*/
path: string;

}

/**
* Event: Notification that a plot has been updated on the backend.
*/
Expand Down Expand Up @@ -69,23 +58,6 @@ export class PositronPlotComm extends PositronBaseComm {
return super.performRpc('render', ['height', 'width', 'pixel_ratio'], [height, width, pixelRatio]);
}

/**
* Save a plot
*
* Requests a plot to be saved to a file. The plot path is returned as a
* string.
*
* @param path The requested plot path
* @param height The requested plot height, in pixels
* @param width The requested plot width, in pixels
* @param dpi The pixel ratio of the display device
*
* @returns A saved plot's path
*/
save(path: string, height: number, width: number, dpi: number): Promise<SavedPlot> {
return super.performRpc('save', ['path', 'height', 'width', 'dpi'], [path, height, width, dpi]);
}


/**
* Notification that a plot has been updated on the backend.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export interface IPositronPlotsService {
selectHistoryPolicy(policy: HistoryPolicy): void;

/**
* Saves the plot with the specified FileSystemHandle.
* Saves the plot.
*/
savePlot(): void;

Expand Down

0 comments on commit b7fa5e5

Please sign in to comment.