Skip to content

Build your personal knowledge base with Trilium Notes

style(next): promoted attributes widget: tweak checkboxes

Adorian Doranee2d4c683041
diff --git a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js b/src/public/app/widgets/ribbon_widgets/promoted_attributes.js
index 9cf0951ffb..75ed276ec6 100644
--- a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js
+++ b/src/public/app/widgets/ribbon_widgets/promoted_attributes.js
@@ -226,6 +226,9 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
} else if (definition.labelType === "boolean") {
$input.prop("type", "checkbox");
+ $input.wrap($(`<label class="tn-checkbox"></label>`));
+ $wrapper.find(".input-group").removeClass("input-group");
+
if (valueAttr.value === "true") {
$input.prop("checked", "checked");
}
diff --git a/src/public/stylesheets/theme-next/shell.css b/src/public/stylesheets/theme-next/shell.css
index 64d5f508b4..a4ab77af22 100644
--- a/src/public/stylesheets/theme-next/shell.css
+++ b/src/public/stylesheets/theme-next/shell.css
@@ -1878,6 +1878,13 @@ div.promoted-attribute-cell input {
font-weight: 500;
}
+div.promoted-attribute-cell .tn-checkbox {
+ --box-label-gap: 0;
+
+ height: 1cap;
+ margin: 0 1em;
+}
+
div.promoted-attribute-cell .multiplicity {
--icon-button-size: 28px;