Revert "adjusted sizing"

This reverts commit 2a330fe5832e1548b2ba933858200c677a772159.
This commit is contained in:
mpetrov 2024-11-22 12:07:06 +02:00
parent 78e1efd536
commit c6ff132a24
3 changed files with 6 additions and 5 deletions

View File

@ -105,14 +105,14 @@ export class AuditLogDetailsDialogComponent extends DialogComponent<AuditLogDeta
let newWidth = 600; let newWidth = 600;
if (content && content.length > 0) { if (content && content.length > 0) {
const lines = content.split('\n'); const lines = content.split('\n');
newHeight = 17 * lines.length + 16; newHeight = 18 * lines.length + 16;
let maxLineLength = 0; let maxLineLength = 0;
lines.forEach((row) => { lines.forEach((row) => {
const line = row.replace(/\t/g, ' ').replace(/\n/g, ''); const line = row.replace(/\t/g, ' ').replace(/\n/g, '');
const lineLength = line.length; const lineLength = line.length;
maxLineLength = Math.max(maxLineLength, lineLength); maxLineLength = Math.max(maxLineLength, lineLength);
}); });
newWidth = 9 * maxLineLength + 16; newWidth = 10 * maxLineLength + 16;
} }
// newHeight = Math.min(400, newHeight); // newHeight = Math.min(400, newHeight);
this.renderer.setStyle(editorElement, 'minHeight', newHeight.toString() + 'px'); this.renderer.setStyle(editorElement, 'minHeight', newHeight.toString() + 'px');

View File

@ -139,14 +139,14 @@ export class EventContentDialogComponent extends DialogComponent<EventContentDia
let newWidth = 600; let newWidth = 600;
if (content && content.length > 0) { if (content && content.length > 0) {
const lines = content.split('\n'); const lines = content.split('\n');
newHeight = 17 * lines.length + 16; newHeight = 18 * lines.length + 16;
let maxLineLength = 0; let maxLineLength = 0;
lines.forEach((row) => { lines.forEach((row) => {
const line = row.replace(/\t/g, ' ').replace(/\n/g, ''); const line = row.replace(/\t/g, ' ').replace(/\n/g, '');
const lineLength = line.length; const lineLength = line.length;
maxLineLength = Math.max(maxLineLength, lineLength); maxLineLength = Math.max(maxLineLength, lineLength);
}); });
newWidth = 9 * maxLineLength + 16; newWidth = 10 * maxLineLength + 16;
} }
// newHeight = Math.min(400, newHeight); // newHeight = Math.min(400, newHeight);
this.renderer.setStyle(editorElement, 'minHeight', newHeight.toString() + 'px'); this.renderer.setStyle(editorElement, 'minHeight', newHeight.toString() + 'px');

View File

@ -118,7 +118,7 @@
padding: 0; padding: 0;
pre[class*=language-] { pre[class*=language-] {
margin: 0; margin: 0;
padding: 9px 38px 9px 16px; padding: 10px 38px 10px 16px;
background: rgba(0, 0, 0, 0.03); background: rgba(0, 0, 0, 0.03);
border-radius: 6px; border-radius: 6px;
border: none; border: none;
@ -128,6 +128,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
line-height: 16px;
letter-spacing: 0.25px; letter-spacing: 0.25px;
color: rgba(0, 0, 0, 0.38); color: rgba(0, 0, 0, 0.38);
overflow: hidden; overflow: hidden;