From b97030a109d9e2eeaf56755d8b41a76cd4234ecd Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 20 Dec 2023 21:56:16 +0100 Subject: [PATCH] Fix hotkey documentation --- public/css/index-tailwind-output.css | 17 +++++++++++------ src/Models/ThemeViewState.ts | 10 +++++++++- src/index.css | 9 +++++++-- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index a3194d364..97d7b77fe 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -1834,10 +1834,6 @@ video { padding-left: 0.5rem; } -.pr-4 { - padding-right: 1rem; -} - .pt-0\.5 { padding-top: 0.125rem; } @@ -1858,6 +1854,10 @@ video { padding-left: 1rem; } +.pr-4 { + padding-right: 1rem; +} + .pl-3 { padding-left: 0.75rem; } @@ -2385,7 +2385,7 @@ button.selected svg path, .button.selected svg path { fill: var(--catch-detail-foregroundcolor) !important; } -button:not(.no-image-background) svg path, .button:not(.no-image-background) svg path { +button:not(.no-image-background):not(.soft) svg path, .button:not(.no-image-background):not(.soft) svg path { fill: var(--interactive-foreground) !important; transition: all 250ms; } @@ -2514,6 +2514,11 @@ button.soft, .button.soft { margin: 0; } +button.soft:hover, .button.soft:hover { + background-color: var(--interactive-background); + color: var(--interactive-foreground); +} + .links-as-button a { /* * Let a 'link' mimick a button, but not entirely @@ -2528,7 +2533,7 @@ button.soft, .button.soft { .links-as-button a:hover { background-color: var(--interactive-background); - color: var(--catch-detail-foregroundcolor); + color: var(--interactive-foregroundcolor); border-color: var(--catch-detail-color-contrast); } diff --git a/src/Models/ThemeViewState.ts b/src/Models/ThemeViewState.ts index f54a5e794..96852cdba 100644 --- a/src/Models/ThemeViewState.ts +++ b/src/Models/ThemeViewState.ts @@ -525,12 +525,20 @@ export default class ThemeViewState implements SpecialVisualizationState { ) for (let i = 1; i < 9; i++) { + let doc = docs.selectItemI.Subs({ i }) + if (i === 1) { + doc = docs.selectItem + } else if (i === 2) { + doc = docs.selectItem2 + } else if (i === 3) { + doc = docs.selectItem3 + } Hotkeys.RegisterHotkey( { nomod: "" + i, onUp: true, }, - docs.selectItem, + doc, () => this.selectClosestAtCenter(i - 1) ) } diff --git a/src/index.css b/src/index.css index a49698a2e..3e1a468f3 100644 --- a/src/index.css +++ b/src/index.css @@ -220,7 +220,7 @@ button.selected svg path, .button.selected svg path { fill: var(--catch-detail-foregroundcolor) !important; } -button:not(.no-image-background) svg path, .button:not(.no-image-background) svg path { +button:not(.no-image-background):not(.soft) svg path, .button:not(.no-image-background):not(.soft) svg path { fill: var(--interactive-foreground) !important;; transition: all 250ms; } @@ -355,6 +355,11 @@ button.soft, .button.soft { margin: 0; } +button.soft:hover, .button.soft:hover { + background-color: var(--interactive-background); + color: var(--interactive-foreground); +} + .links-as-button a { /* * Let a 'link' mimick a button, but not entirely @@ -369,7 +374,7 @@ button.soft, .button.soft { .links-as-button a:hover { background-color: var(--interactive-background); - color: var(--catch-detail-foregroundcolor); + color: var(--interactive-foregroundcolor); border-color: var(--catch-detail-color-contrast); }