Skip to content

Commit

Permalink
bluescreen: "caused by" facelift
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 16, 2023
1 parent 5a3a60b commit a454dbd
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 26 deletions.
36 changes: 21 additions & 15 deletions src/Tracy/BlueScreen/assets/bluescreen.css
Expand Up @@ -193,7 +193,7 @@ html.tracy-bs-visible body {
}

#tracy-bs .tracy-section-panel {
background: #F4F3F1;
background: #5040200E;
padding: var(--tracy-space) var(--tracy-space) 0;
margin: 0 0 var(--tracy-space);
border-radius: 8px;
Expand All @@ -215,11 +215,12 @@ html.tracy-bs-visible body {
#tracy-bs .tracy-section--error {
background: #CD1818;
color: white;
font-size: 13pt;
padding-top: var(--tracy-space);
}

#tracy-bs .tracy-section--error p,
#tracy-bs .tracy-section--error h1 {
font-size: 13pt;
color: white;
}

Expand All @@ -229,7 +230,7 @@ html.tracy-bs-visible body {
background: #FDF5CE !important;
}

#tracy-bs .tracy-section--error a {
#tracy-bs .tracy-section--error h1 a {
color: #ffefa1 !important;
}

Expand Down Expand Up @@ -259,6 +260,23 @@ html.tracy-bs-visible body {
font-style: normal;
}

#tracy-bs .tracy-section--error:has(.tracy-caused) {
border-radius: 0 0 0 8px;
overflow: hidden;
}

#tracy-bs .tracy-caused {
margin: 0 calc(-1.5 * var(--tracy-space));
padding: .3em calc(1.5 * var(--tracy-space));
background: #df8075;
white-space: nowrap;
}

#tracy-bs .tracy-caused a {
color: white;
}



/* source code */
#tracy-bs pre.tracy-code > div {
Expand Down Expand Up @@ -322,18 +340,6 @@ html.tracy-bs-visible body {
color: #0003;
}

#tracy-bs .tracy-caused {
float: right;
padding: .3em calc(1.5 * var(--tracy-space));
background: #df8075;
border-radius: 0 0 0 8px;
white-space: nowrap;
}

#tracy-bs .tracy-caused a {
color: white;
}

#tracy-bs .tracy-callstack {
display: grid;
grid-template-columns: max-content 1fr;
Expand Down
12 changes: 6 additions & 6 deletions src/Tracy/BlueScreen/assets/section-header.phtml
Expand Up @@ -26,10 +26,10 @@ $code = $ex->getCode() ? ' #' . $ex->getCode() : '';
<a href="<?= Helpers::escapeHtml($item['link']) ?>" class="tracy-action"<?= empty($item['external']) ? '' : ' target="_blank" rel="noreferrer noopener"'?>><?= Helpers::escapeHtml($item['label']) ?>&#x25ba;</a>
<?php endforeach ?>
</h1>
</section>

<?php if ($ex->getPrevious()): ?>
<div class="tracy-caused">
<a href="#tracyCaused<?= count($exceptions) + 1 ?>">Caused by <?= Helpers::escapeHtml(get_debug_type($ex->getPrevious())) ?></a>
</div>
<?php endif ?>
<?php if ($ex->getPrevious()): ?>
<div class="tracy-caused">
<a href="#tracyCaused<?= count($exceptions) + 1 ?>">Caused by <?= Helpers::escapeHtml(get_debug_type($ex->getPrevious())) ?></a>
</div>
<?php endif ?>
</section>
2 changes: 1 addition & 1 deletion tests/Tracy/expected/Debugger.error-in-eval.expect
Expand Up @@ -23,8 +23,8 @@
<h1><span>The my error</span>
<a href="%a%" class="tracy-action" target="_blank" rel="noreferrer noopener">search&#x25ba;</a>
</h1>
</section>

</section>



Expand Down
2 changes: 1 addition & 1 deletion tests/Tracy/expected/Debugger.exception.fiber.html.expect
Expand Up @@ -23,8 +23,8 @@
<h1><span>The my exception</span>
<a href="%a%" class="tracy-action" target="_blank" rel="noreferrer noopener">search&#x25ba;</a>
</h1>
</section>

</section>


<section class="tracy-section tracy-section--stack">
Expand Down
Expand Up @@ -23,8 +23,8 @@
<h1><span>The my exception</span>
<a href="%a%" class="tracy-action" target="_blank" rel="noreferrer noopener">search&#x25ba;</a>
</h1>
</section>

</section>


<section class="tracy-section tracy-section--stack">
Expand Down
2 changes: 1 addition & 1 deletion tests/Tracy/expected/Debugger.exception.html.expect
Expand Up @@ -23,8 +23,8 @@
<h1><span>The my exception</span>
<a href="%a%" class="tracy-action" target="_blank" rel="noreferrer noopener">search&#x25ba;</a>
</h1>
</section>

</section>



Expand Down
2 changes: 1 addition & 1 deletion tests/Tracy/expected/Debugger.strict.html.expect
Expand Up @@ -23,8 +23,8 @@
<h1><span>Only variables should be assigned by reference</span>
<a href="%a%" target="_blank" rel="noreferrer noopener">search&#x25ba;</a>
</h1>
</section>

</section>



Expand Down

0 comments on commit a454dbd

Please sign in to comment.