Skip to content

Commit 2083890

Browse files
ozgesolidkeyclaude
andcommitted
Fix color picker z-index and minimap tooltip overflow
- Color picker: switched to position:fixed + JS-computed right/bottom from getBoundingClientRect() so it renders above the minimap's colored lines (backdrop-filter on .bottom-panel was creating a scoped stacking context) - Minimap tooltip: width:max-content + white-space:nowrap so large line numbers like "Line 250,249" are never clipped Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 61c6b18 commit 2083890

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/renderer/renderer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5201,7 +5201,7 @@ function applyPanelBgColor(color: string): void {
52015201
}
52025202

52035203
function initBottomPanelColorPicker(): void {
5204-
const btn = document.getElementById('btn-panel-color');
5204+
const btn = document.getElementById('btn-panel-color') as HTMLElement;
52055205
const picker = document.getElementById('panel-color-picker') as HTMLElement;
52065206
const canvas = document.getElementById('panel-color-wheel') as HTMLCanvasElement;
52075207
const resetBtn = document.getElementById('btn-panel-color-reset');
@@ -5219,6 +5219,10 @@ function initBottomPanelColorPicker(): void {
52195219
function openPicker(): void {
52205220
isOpen = true;
52215221
picker.classList.remove('hidden');
5222+
// Position above the button using fixed coords (avoids stacking context issues)
5223+
const r = btn.getBoundingClientRect();
5224+
picker.style.right = `${window.innerWidth - r.right}px`;
5225+
picker.style.bottom = `${window.innerHeight - r.top + 4}px`;
52225226
}
52235227
function closePicker(): void {
52245228
isOpen = false;

src/renderer/styles.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,19 +3110,19 @@ body.platform-darwin .titlebar {
31103110
/* Line-number tooltip */
31113111
.minimap-tooltip {
31123112
position: absolute;
3113-
left: 8px;
3114-
right: 2px;
3113+
right: 2px; /* anchored to right edge of minimap */
3114+
width: max-content; /* grows left to fit the text */
31153115
height: 16px;
31163116
line-height: 16px;
3117+
padding: 0 5px;
31173118
text-align: center;
3118-
background: rgba(10, 14, 20, 0.82);
3119-
color: rgba(255, 255, 255, 0.88);
3119+
background: rgba(10, 14, 20, 0.88);
3120+
color: rgba(255, 255, 255, 0.92);
31203121
font-size: 10px;
31213122
font-family: var(--font-mono, monospace);
31223123
pointer-events: none;
31233124
z-index: 20;
31243125
border-radius: 2px;
3125-
overflow: hidden;
31263126
white-space: nowrap;
31273127
}
31283128
.minimap-tooltip.hidden { display: none; }
@@ -4047,10 +4047,8 @@ kbd {
40474047
}
40484048

40494049
.panel-color-picker {
4050-
position: absolute;
4051-
bottom: 100%;
4052-
right: 40px;
4053-
z-index: 200;
4050+
position: fixed; /* root stacking context — above minimap, above everything */
4051+
z-index: 10000;
40544052
background: var(--bg-secondary, #252526);
40554053
border: 1px solid rgba(255, 255, 255, 0.12);
40564054
border-radius: 10px;

0 commit comments

Comments
 (0)