From c3b4742eeceee9250f8059972dd150f38e2eb021 Mon Sep 17 00:00:00 2001
From: "jakob.stendahl" <jakob.stendahl@infomedia.dk>
Date: Sun, 4 Dec 2022 13:33:45 +0100
Subject: Fix simulation stuttering (still resource intensive) and some oter
 QOL upgrades

---
 src_frontend/Components/Editor/Pane.svelte | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

(limited to 'src_frontend/Components/Editor/Pane.svelte')

diff --git a/src_frontend/Components/Editor/Pane.svelte b/src_frontend/Components/Editor/Pane.svelte
index 143c569..4a375ac 100644
--- a/src_frontend/Components/Editor/Pane.svelte
+++ b/src_frontend/Components/Editor/Pane.svelte
@@ -2,11 +2,14 @@
     export let header;
     export let padding = true;
     export let scrollable = true;
+
+    export let contentBackground = "--default-bg";
 </script>
 
 <style>
     .box {
-        background-color: #444242;
+        --default-bg: #444242;
+        background-color: var(--default-bg, #444242);
         border-radius: 5px;
         height: 100%;
     }
@@ -15,14 +18,18 @@
         padding: 10px;
         box-sizing: border-box;
         border-bottom: 1px solid #333333; 
+        display: flex;
+        align-items: baseline;
     }
     .header h1 {
         margin: 0;
+        margin-right: auto;
         font-size: 12px;
         font-weight: bold;
         text-transform: uppercase;
     }
     .content {
+        background-color: var(--content-bg, #444242);
         height: calc(100% - 35px);
         width: 100%;
         box-sizing: border-box;
@@ -31,11 +38,12 @@
     .scrollable { overflow: auto; }
 </style>
 
-<div class="box">
+<div class="box" style="--content-bg: {contentBackground}">
     <div class="header">
         <h1>{header}</h1>
+        <slot name="actions"></slot>
     </div>
     <div class="content" class:padding={padding} class:scrollable={scrollable}>
         <slot></slot>
     </div>
-</div>
\ No newline at end of file
+</div>
-- 
cgit v1.2.3

