From 75c85e7e0ac8fa5eeb8d97ffa531629cf15adaab Mon Sep 17 00:00:00 2001 From: Gato Date: Fri, 19 Jun 2026 15:20:55 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20corriger=20les=20classes=20CSS=20mortes?= =?UTF-8?q?=20de=20la=20sidebar=20dans=20les=20th=C3=A8mes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Les thèmes référençaient d'anciennes classes (sidebar__menu__*__link) jamais générées par le JS. Remplacement par les vraies classes nav-tree (nav-root-link, nav-folder-link, nav-file-link) et ajout du fond sidebar et des états actifs configurables par thème. Co-Authored-By: Claude Sonnet 4.6 --- src-tauri/resources/themes/default.css | 37 +++++++++++++++------ src-tauri/resources/themes/shell-indigo.css | 10 +++--- src/style.css | 12 +++++-- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src-tauri/resources/themes/default.css b/src-tauri/resources/themes/default.css index 1bd593d..00d0a22 100644 --- a/src-tauri/resources/themes/default.css +++ b/src-tauri/resources/themes/default.css @@ -187,25 +187,42 @@ body { /* ── Barre latérale ─────────────────────────── */ -/* Lien de premier niveau au survol */ -.sidebar__menu__first-level-title__link:hover { +/* Fond de la barre latérale */ +.sidebar { + background: #1a1b2e; +} + +/* Lien racine (premier niveau) au survol */ +.nav-root-link:hover { color: #818cf8; } -/* Lien de premier niveau actif (page ouverte) */ -.sidebar__menu__first-level-title__link.active { +/* Lien racine (premier niveau) actif (page ouverte) */ +.nav-root-link.active { color: #818cf8; background: rgba(129, 140, 248, 0.08); } -/* Lien de second niveau au survol */ -.sidebar__menu__second-level-title__link:hover { +/* Lien de dossier au survol */ +.nav-folder-link:hover { color: #818cf8; } -/* Lien de second niveau actif (page ouverte) */ -.sidebar__menu__second-level-title__link.active { +/* Lien de dossier actif */ +.nav-folder-link.active { color: #818cf8; + background: rgba(129, 140, 248, 0.08); +} + +/* Lien de fichier (sous-niveaux) au survol */ +.nav-file-link:hover { + color: #818cf8; +} + +/* Lien de fichier actif (page ouverte) */ +.nav-file-link.active { + color: #818cf8; + background: rgba(129, 140, 248, 0.08); } @@ -213,8 +230,8 @@ body { /* Fond et bordure inférieure de la barre de titre */ #titlebar { - background: #0f172a; - border-bottom: 1px solid #1e293b; + background: #1a1b2e; + /* border-bottom: 1px solid #1e293b; */ } /* Texte du titre de la fenêtre */ diff --git a/src-tauri/resources/themes/shell-indigo.css b/src-tauri/resources/themes/shell-indigo.css index d60b943..d1be62e 100644 --- a/src-tauri/resources/themes/shell-indigo.css +++ b/src-tauri/resources/themes/shell-indigo.css @@ -17,10 +17,12 @@ body { background: #f1f5f9; } .content table td { border-bottom-color: rgba(79, 70, 229, 0.25); } .content strong { color: #0f172a; } .content hr { border-color: #e2e8f0; } -.sidebar__menu__first-level-title__link:hover { color: #818cf8; } -.sidebar__menu__first-level-title__link.active { color: #818cf8; background: rgba(129, 140, 248, 0.08); } -.sidebar__menu__second-level-title__link:hover { color: #818cf8; } -.sidebar__menu__second-level-title__link.active { color: #818cf8; } +.nav-root-link:hover { color: #818cf8; } +.nav-root-link.active { color: #818cf8; background: rgba(129, 140, 248, 0.08); } +.nav-folder-link:hover { color: #818cf8; } +.nav-folder-link.active { color: #818cf8; background: rgba(129, 140, 248, 0.08); } +.nav-file-link:hover { color: #818cf8; } +.nav-file-link.active { color: #818cf8; background: rgba(129, 140, 248, 0.08); } #titlebar { background: #0f172a; border-bottom: 1px solid #1e293b; } #titlebar-title { color: rgba(255,255,255,0.5); } .titlebar-controls button { color: rgba(255,255,255,0.45); } diff --git a/src/style.css b/src/style.css index 636dfec..605a1ba 100644 --- a/src/style.css +++ b/src/style.css @@ -324,7 +324,11 @@ body { transition: color 0.2s; } .nav-root-link:hover { color: #ff5577; } -.nav-root-link.active { color: #ff5577; font-weight: 500; } +.nav-root-link.active { + color: #818cf8; + background: rgba(129, 140, 248, 0.08); + font-weight: 500; +} .nav-folder { margin: 0; } .nav-folder > summary { @@ -392,7 +396,11 @@ body { transition: color 0.2s; } .nav-file-link:hover { color: #ff5577; } -.nav-file-link.active { color: #ff5577; font-weight: 500; } +.nav-file-link.active { + color: #818cf8; + background: rgba(129, 140, 248, 0.08); + font-weight: 500; +} .nav-depth-1 > .nav-file-link { padding: 5px 24px 5px 52px; } .nav-depth-1 > .nav-folder > summary { padding-left: 24px; }