defaults values from panel

This commit is contained in:
Julie Blanc 2026-03-05 16:51:35 +01:00
parent ace75a3fb2
commit 449f0eda31

View file

@ -692,6 +692,26 @@ watch(fontFamily, async (val) => {
if (val && val !== 'sans-serif') await loadFont(val); if (val && val !== 'sans-serif') await loadFont(val);
}); });
// Sync disabled special groups with TextSettings defaults
watch(() => textDefaults.fontFamily, (val) => {
if (!settingEnabled.font) fontFamily.value = val;
});
watch(() => textDefaults.fontSize, (val) => {
if (!settingEnabled.fontSize) {
fontSize.value = val.value;
fontSize.unit = val.unit;
}
}, { deep: true });
watch(() => textDefaults.lineHeight, (val) => {
if (!settingEnabled.lineHeight) {
lineHeight.value = val.value;
lineHeight.unit = val.unit;
}
}, { deep: true });
watch(() => textDefaults.color, (val) => {
if (!settingEnabled.color) color.value = val;
});
// Watchers simple props (with group guard) // Watchers simple props (with group guard)
for (const prop of styleProps) { for (const prop of styleProps) {
watch(prop.get, () => { watch(prop.get, () => {