diff --git a/app/src/asset/index.ts b/app/src/asset/index.ts index 0b6e85178..f693315a4 100644 --- a/app/src/asset/index.ts +++ b/app/src/asset/index.ts @@ -142,17 +142,25 @@ export class Asset extends Model { - - +
- - +
- - +
- - +
diff --git a/app/src/asset/pdf/pdf_find_bar.js b/app/src/asset/pdf/pdf_find_bar.js index a6ab382b6..8056450c8 100644 --- a/app/src/asset/pdf/pdf_find_bar.js +++ b/app/src/asset/pdf/pdf_find_bar.js @@ -73,18 +73,39 @@ class PDFFindBar { this.highlightAll.addEventListener('click', () => { this.dispatchEvent('highlightallchange') + // NOTE: 以下三个相同 https://github.com/siyuan-note/siyuan/issues/5338 + if (this.highlightAll.checked) { + this.highlightAll.parentElement.classList.remove("b3-button--outline") + } else { + this.highlightAll.parentElement.classList.add("b3-button--outline") + } }) this.caseSensitive.addEventListener('click', () => { this.dispatchEvent('casesensitivitychange') + if (this.caseSensitive.checked) { + this.caseSensitive.parentElement.classList.remove("b3-button--outline") + } else { + this.caseSensitive.parentElement.classList.add("b3-button--outline") + } }) this.entireWord.addEventListener('click', () => { this.dispatchEvent('entirewordchange') + if (this.entireWord.checked) { + this.entireWord.parentElement.classList.remove("b3-button--outline") + } else { + this.entireWord.parentElement.classList.add("b3-button--outline") + } }) this.matchDiacritics.addEventListener('click', () => { this.dispatchEvent('diacriticmatchingchange') + if (this.matchDiacritics.checked) { + this.matchDiacritics.parentElement.classList.remove("b3-button--outline") + } else { + this.matchDiacritics.parentElement.classList.add("b3-button--outline") + } }) this.eventBus._on('resize', this.#adjustWidth.bind(this)) diff --git a/app/src/assets/scss/pdf/_pdf.scss b/app/src/assets/scss/pdf/_pdf.scss index 30d7c2592..8a61ec86c 100644 --- a/app/src/assets/scss/pdf/_pdf.scss +++ b/app/src/assets/scss/pdf/_pdf.scss @@ -391,11 +391,6 @@ margin: 10px 0 3px 7px; } -.findbar .toolbarField[type="checkbox"]:checked + .b3-button { - background-color: var(--b3-theme-primary); - color: var(--b3-theme-on-primary); -} - .toolbarField.pageNumber { min-width: 16px; text-align: right;