defaults values from panel
This commit is contained in:
parent
ace75a3fb2
commit
449f0eda31
1 changed files with 20 additions and 0 deletions
|
|
@ -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, () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue