Skip to content

Build your personal knowledge base with Trilium Notes

style/quick edit dialog: ignore monochromatic custom colors

Adorian Doran535b960b767e
diff --git a/apps/client/src/widgets/dialogs/popup_editor.ts b/apps/client/src/widgets/dialogs/popup_editor.ts
index 9b4e70c321..c1417d9068 100644
--- a/apps/client/src/widgets/dialogs/popup_editor.ts
+++ b/apps/client/src/widgets/dialogs/popup_editor.ts
@@ -120,11 +120,17 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
const wrapperElement = this.$wrapper.get(0)!;
if (colorClass) {
- wrapperElement.className = "quick-edit-dialog-wrapper tinted-dialog " + colorClass;
+ wrapperElement.className = "quick-edit-dialog-wrapper " + colorClass;
} else {
wrapperElement.className = "quick-edit-dialog-wrapper";
}
+ const customHue = getComputedStyle(wrapperElement).getPropertyValue("--custom-color-hue");
+ if (customHue) {
+ /* Apply the tinted-dialog class only if the custom color CSS class specifies a hue */
+ wrapperElement.classList.add("tinted-dialog");
+ }
+
const activeEl = document.activeElement;
if (activeEl && "blur" in activeEl) {
(activeEl as HTMLElement).blur();