mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-13 20:12:54 -07:00
fix: align Hyprland overlay windows to mpv and stop pinning them
- Force-apply exact Hyprland move/resize/setprop dispatches when bounds are provided - Stop pinning overlay windows; toggle pin off when Hyprland reports pinned=true - Compensate stats overlay outer placement for Electron/Wayland content insets - Make stats overlay window and page opaque so mpv cannot show through transparent insets - Constrain stats app to h-screen with internal scroll so content covers mpv from y=0 - Lock overlay/stats window titles against page-title-updated events - Add regression coverage for placement dispatches, inset compensation, and CSS overlay mode
This commit is contained in:
@@ -34,17 +34,30 @@
|
||||
--font-mono: 'Geist Mono Variable', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--font-sans);
|
||||
background-color: var(--color-ctp-base);
|
||||
color: var(--color-ctp-text);
|
||||
overflow: hidden;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body.overlay-mode {
|
||||
background-color: rgba(36, 39, 58, 0.85);
|
||||
background-color: var(--color-ctp-base);
|
||||
}
|
||||
|
||||
body.overlay-mode #root {
|
||||
background-color: var(--color-ctp-base);
|
||||
}
|
||||
|
||||
/* Custom scrollbar */
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const css = readFileSync(fileURLToPath(new URL('./globals.css', import.meta.url)), 'utf8');
|
||||
|
||||
test('stats overlay mode paints an opaque full-viewport background', () => {
|
||||
assert.match(css, /html,\s*body,\s*#root\s*\{[^}]*height:\s*100%;/s);
|
||||
assert.match(css, /body\.overlay-mode\s*\{[^}]*background-color:\s*var\(--color-ctp-base\);/s);
|
||||
assert.doesNotMatch(css, /body\.overlay-mode\s*\{[^}]*rgba\(/s);
|
||||
assert.match(
|
||||
css,
|
||||
/body\.overlay-mode #root\s*\{[^}]*background-color:\s*var\(--color-ctp-base\);/s,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user