diff --git a/src/App.css b/src/App.css
index 35c6db3..100dbd8 100644
--- a/src/App.css
+++ b/src/App.css
@@ -465,6 +465,8 @@ button {
width: 90%;
position: relative;
border: 1px solid rgba(128, 128, 128, 0.1);
+ max-height: 85vh;
+ overflow-y: auto;
}
.help-item {
@@ -781,7 +783,7 @@ button {
display: flex;
align-items: center;
justify-content: center;
- background: #2a2a2a;
+ /* background: #2a2a2a; Removed hardcoded background to respect theme */
min-height: 100px;
/* Reduced to fit on screen */
max-height: 50vh;
diff --git a/src/App.tsx b/src/App.tsx
index 0887ce6..33fd018 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -61,7 +61,8 @@ function App() {
virtualGuitarVolume: 0.5,
virtualGuitarMute: false,
micSensitivity: 0.5,
- disableAnimation: false
+ disableAnimation: false,
+ theme: 'auto'
});
const { pitchData, error, audioLevel, debugInfo, isListening } = usePitchDetector(listening, settings.micSensitivity);
@@ -85,6 +86,17 @@ function App() {
return () => window.removeEventListener('resize', handleResize);
}, []);
+ // Theme support
+ useEffect(() => {
+ const root = document.documentElement;
+ const theme = settings.theme || 'auto';
+ if (theme === 'auto') {
+ root.removeAttribute('data-theme');
+ } else {
+ root.setAttribute('data-theme', theme);
+ }
+ }, [settings.theme]);
+
useEffect(() => {
const handleFullscreenChange = () => {
setIsFullscreen(!!document.fullscreenElement);
diff --git a/src/components/Controls.tsx b/src/components/Controls.tsx
index c0b5a49..a99ec65 100644
--- a/src/components/Controls.tsx
+++ b/src/components/Controls.tsx
@@ -35,6 +35,7 @@ export interface AppSettings {
micSensitivity?: number; // 0.0 to 1.0 (0=least sensitive, 1=most)
virtualGuitarMute?: boolean;
disableAnimation?: boolean;
+ theme?: 'light' | 'dark' | 'auto';
}
interface ControlsProps {
diff --git a/src/components/Fretboard.tsx b/src/components/Fretboard.tsx
index 31a3c01..e1103d8 100644
--- a/src/components/Fretboard.tsx
+++ b/src/components/Fretboard.tsx
@@ -99,7 +99,8 @@ export function Fretboard({
y={paddingY}
width={width - (paddingX * 2) - nutWidth}
height={height - (paddingY * 2)}
- fill="#999999"
+ fill="var(--color-text-muted)"
+ fillOpacity={0.3}
stroke="none"
/>
@@ -109,7 +110,7 @@ export function Fretboard({
y={paddingY}
width={nutWidth}
height={height - (paddingY * 2)}
- fill="#333"
+ fill="var(--color-primary)"
/>
{/* Fret Markers (Dots) */}
@@ -120,13 +121,13 @@ export function Fretboard({
if (isDouble) {
return (