|
2450 | 2450 | function hideVolumePopup() { |
2451 | 2451 | volumePopup.classList.remove('visible'); |
2452 | 2452 | btnMute.classList.remove('dropdown-open'); |
| 2453 | + if (!strip.matches(':hover')) scheduleHide(); |
2453 | 2454 | } |
2454 | 2455 |
|
2455 | 2456 | btnMute.addEventListener('click', (e) => { |
|
2806 | 2807 |
|
2807 | 2808 | document.addEventListener('click', (e) => { |
2808 | 2809 | if (!strip.contains(e.target) && !recentDropdown.contains(e.target) && !bookmarksDropdown.contains(e.target)) { |
| 2810 | + const hadDropdown = recentDropdown.classList.contains('visible') || bookmarksDropdown.classList.contains('visible'); |
2809 | 2811 | recentDropdown.classList.remove('visible'); |
2810 | 2812 | bookmarksDropdown.classList.remove('visible'); |
| 2813 | + if (hadDropdown && !strip.matches(':hover')) scheduleHide(); |
2811 | 2814 | } |
2812 | 2815 | if (!strip.contains(e.target) && !snapPopup.contains(e.target)) { |
2813 | 2816 | snapPopup.classList.remove('visible'); |
|
3552 | 3555 | settingsModal.classList.remove('visible'); |
3553 | 3556 | settingsModal.classList.add('hidden'); |
3554 | 3557 | modalOverlay.classList.remove('visible'); |
| 3558 | + if (!strip.matches(':hover')) scheduleHide(); |
3555 | 3559 | } |
3556 | 3560 |
|
3557 | 3561 | settingHomeUrl.addEventListener('change', async () => { |
|
3659 | 3663 |
|
3660 | 3664 | function hideContextMenu() { |
3661 | 3665 | contextMenu.classList.remove('visible'); |
| 3666 | + if (!strip.matches(':hover')) scheduleHide(); |
3662 | 3667 | } |
3663 | 3668 |
|
3664 | 3669 | strip.addEventListener('contextmenu', (e) => { |
|
3758 | 3763 | tutorialModal.classList.remove('visible'); |
3759 | 3764 | tutorialModal.classList.add('hidden'); |
3760 | 3765 | modalOverlay.classList.remove('visible'); |
| 3766 | + if (!strip.matches(':hover')) scheduleHide(); |
3761 | 3767 | if (config) { |
3762 | 3768 | config.first_run = false; |
3763 | 3769 | await invoke('update_config', { config }); |
|
3901 | 3907 | } |
3902 | 3908 | if (config) config.window.locked = value; |
3903 | 3909 | break; |
3904 | | - case 'opacity': |
3905 | | - opacitySlider.value = opacityToSlider(value); |
| 3910 | + case 'opacity': { |
| 3911 | + const sv = opacityToSlider(value); |
| 3912 | + opacitySlider.value = sv; |
| 3913 | + settingOpacity.value = sv; |
| 3914 | + settingOpacityValue.textContent = Math.round(value * 100); |
3906 | 3915 | applyContentOpacity(value); |
3907 | 3916 | if (config) config.window.opacity = value; |
3908 | 3917 | break; |
| 3918 | + } |
3909 | 3919 | case 'open_settings': |
3910 | 3920 | container.style.display = ''; |
3911 | 3921 | showStrip(); |
|
3933 | 3943 | const listen = window.__TAURI__.event.listen; |
3934 | 3944 |
|
3935 | 3945 | listen('opacity-changed', (event) => { |
3936 | | - opacitySlider.value = opacityToSlider(event.payload); |
| 3946 | + const sv = opacityToSlider(event.payload); |
| 3947 | + opacitySlider.value = sv; |
| 3948 | + settingOpacity.value = sv; |
| 3949 | + settingOpacityValue.textContent = Math.round(event.payload * 100); |
3937 | 3950 | applyContentOpacity(event.payload); |
3938 | 3951 | if (config) { |
3939 | 3952 | config.window.opacity = event.payload; |
|
0 commit comments