Warning: session_start(): open(/var/lib/php/sessions/sess_tmkk6lt51ru9rgi82pn0nqmsvi, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule2 FixFonts > DynEnabled {
switchable int fontSize = 16;
transient RSTOverQ rstUpdateAllModules = dm_rstOverModuleQ(this, r updateAllModules_impl);
start {
dm_onAnyModuleVisualized(mod -> {
//print("Module " + mod + " visualized: " + dm_vis(mod));
dm_q(r { updateModule(mod) });
});
dm_onFieldChangeAndNow(ll("fontSize", "enabled"), r updateAllModules);
dm_vmBus_onMessage updateLayoutNow(voidfunc(JComponent c) {
updateComponent(c);
});
dm_vmBus_answerToMessage formSafetyMargin(() -> 20);
}
visualize {
JComponent c = super.visualize();
addToControlArea(dm_intSpinnerWithLabel fontSize(1, 100));
ret jfullcenter(c);
}
void updateAllModules { rstUpdateAllModules.trigger(); }
void updateAllModules_impl {
if (!enabled) ret;
L mods = lambdaFilter dm_isShowing(dm_moduleIDs());
if (empty(mods)) ret;
time {
print("Setting font size of " + nModules(mods) + " to " + fontSize + "...");
for (O mod : mods)
updateModule(mod);
}
}
void updateModule(O mod) {
if (!enabled) ret;
updateComponent(dm_vis(mod));
}
void updateComponent(JComponent c) {
if (c != null) swing {
setAllStandardFontSizesRecursively(c, fontSize, c2 ->
!eq(shortClassName(c2), "RSyntaxTextArea"));
}
}
}