1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-08 04:09:15 -04:00

refactor(control-center): consolidate detail section height rules

This commit is contained in:
purian23
2026-06-02 15:48:47 -04:00
parent 84fe2d751f
commit 1ee42506b6
3 changed files with 16 additions and 33 deletions
@@ -0,0 +1,14 @@
function detailHeightForSection(section, maxHeight, pluginInstance) {
if (!section)
return 0;
if (section === "wifi" || section === "bluetooth"
|| section === "builtin_vpn" || section === "builtin_tailscale")
return Math.min(350, maxHeight);
if (section.startsWith("brightnessSlider_"))
return Math.min(400, maxHeight);
if (section.startsWith("plugin_")) {
const h = pluginInstance ? pluginInstance.ccDetailHeight : 0;
return Math.min(h > 0 ? h : 250, maxHeight);
}
return Math.min(250, maxHeight);
}