@@ -7393,6 +7393,44 @@ function resetAndApplyDefaultClockStyles() {
73937393 return defaultStyles;
73947394}
73957395
7396+ function setupCollapsibleSettings() {
7397+ const homeSettings = document.querySelector('.settings-grid.home-settings');
7398+ if (!homeSettings) return;
7399+
7400+ const headings = homeSettings.querySelectorAll('h4');
7401+ headings.forEach(heading => {
7402+ heading.style.cursor = 'pointer';
7403+ heading.style.userSelect = 'none';
7404+ heading.style.display = 'flex';
7405+ heading.style.alignItems = 'center';
7406+ heading.style.justifyContent = 'space-between';
7407+
7408+ // Prevent duplicate icons if run multiple times
7409+ if (heading.querySelector('.material-symbols-rounded')) return;
7410+
7411+ const icon = document.createElement('span');
7412+ icon.className = 'material-symbols-rounded';
7413+ icon.textContent = 'expand_more';
7414+ icon.style.transition = 'transform 0.3s ease';
7415+ // Default state is expanded (pointing up)
7416+ icon.style.transform = 'rotate(180deg)';
7417+
7418+ heading.appendChild(icon);
7419+
7420+ const content = heading.nextElementSibling;
7421+
7422+ heading.addEventListener('click', () => {
7423+ if (content.style.display === 'none') {
7424+ content.style.display = ''; // Restore grid layout
7425+ icon.style.transform = 'rotate(180deg)';
7426+ } else {
7427+ content.style.display = 'none';
7428+ icon.style.transform = 'rotate(0deg)';
7429+ }
7430+ });
7431+ });
7432+ }
7433+
73967434// Initialize theme and wallpaper on load
73977435function initializeCustomization() {
73987436 setupThemeSwitcher();
@@ -10156,6 +10194,7 @@ document.addEventListener('DOMContentLoaded', async function() {
1015610194
1015710195 initAppDraw(); // Now this will use the fully populated 'apps' object
1015810196 initializeCustomization(); // Now reads correct styles and applies them to DOM
10197+ setupCollapsibleSettings();
1015910198 setupWeatherToggle();
1016010199 initializePageIndicator();
1016110200 loadWidgets(); // Now renders into a correctly styled layout
0 commit comments