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:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user