Skip to content

Commit

Permalink
Melhorias na exibição do modal do renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
dgadelha committed Jan 7, 2025
1 parent edc60e6 commit f4043be
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<header mat-dialog-title>
<header mat-dialog-title cdkDrag cdkDragHandle cdkDragRootElement=".cdk-overlay-pane">
<span>{{ title }}</span>
<s></s>
<button tabindex="-1" type="button" mat-dialog-close mat-icon-button aria-label="Fechar diálogo">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
header {
display: flex;
align-items: center;
padding: 0.5rem 1rem;
padding: 0.25rem 1rem;
}

.renderer-content {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DragDropModule } from "@angular/cdk/drag-drop";
import { Component, ElementRef, Input, ViewChild } from "@angular/core";
import { MatButtonModule } from "@angular/material/button";
import { MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
Expand All @@ -6,7 +7,7 @@ import { IGraphicsRendererComponent } from "../../renderer";

@Component({
selector: "app-dialog-renderer",
imports: [MatButtonModule, MatDialogClose, MatDialogContent, MatDialogTitle, AngularSvgIconModule],
imports: [MatButtonModule, MatDialogClose, MatDialogContent, MatDialogTitle, AngularSvgIconModule, DragDropModule],
templateUrl: "./dialog-renderer.component.html",
styleUrl: "./dialog-renderer.component.scss",
standalone: true,
Expand Down
5 changes: 4 additions & 1 deletion packages/ide/src/app/tab-editor/tab-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ export class TabEditorComponent implements OnInit, OnDestroy {

openRendererModal(): IGraphicsRendererComponent | null {
this.gaService.event("editor_open_renderer", "Editor", "Abrir modal de renderização");
this.graphicsRendererModal = this.dialog.open(DialogRendererComponent);
this.graphicsRendererModal = this.dialog.open(DialogRendererComponent, {
hasBackdrop: false,
panelClass: "portugol-renderer-dialog",
});

this.graphicsRendererModal.afterClosed().subscribe(() => {
this.graphicsRenderer.destroy();
Expand Down
4 changes: 4 additions & 0 deletions packages/ide/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ svg-icon > svg {
.logo-icon[fill] {
fill: var(--pws-color-primary);
}

.portugol-renderer-dialog .mat-mdc-dialog-content {
max-height: unset;
}

0 comments on commit f4043be

Please sign in to comment.