Skip to content

Commit 28fb444

Browse files
davidtorciviaclaude
andcommitted
fix: v1.4.5 — strip persists after closing settings/dropdowns/popups; opacity floor restored to 0.55
- closeSettings, hideVolumePopup, hideContextMenu, dismissTutorial all now call scheduleHide when mouse is outside the strip, matching the pattern already used for urlInput blur - document click handler for recent/bookmarks dropdowns does the same - opacity.rs: WINDOW_ALPHA_FLOOR corrected back to 0.55 (had drifted to 0.85) - opacity-changed event and __floatViewUpdate now sync the settings modal slider so it stays current during external opacity changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eab038d commit 28fb444

5 files changed

Lines changed: 20 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "floatview",
3-
"version": "1.4.2",
3+
"version": "1.4.5",
44
"description": "A minimal floating browser window for streaming media on a secondary monitor",
55
"scripts": {
66
"tauri": "tauri",

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "floatview"
3-
version = "1.4.2"
3+
version = "1.4.5"
44
description = "A minimal floating browser window for streaming media"
55
authors = ["David Torcivia"]
66
license = "MIT"

src-tauri/src/injection.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,7 @@
24502450
function hideVolumePopup() {
24512451
volumePopup.classList.remove('visible');
24522452
btnMute.classList.remove('dropdown-open');
2453+
if (!strip.matches(':hover')) scheduleHide();
24532454
}
24542455

24552456
btnMute.addEventListener('click', (e) => {
@@ -2806,8 +2807,10 @@
28062807

28072808
document.addEventListener('click', (e) => {
28082809
if (!strip.contains(e.target) && !recentDropdown.contains(e.target) && !bookmarksDropdown.contains(e.target)) {
2810+
const hadDropdown = recentDropdown.classList.contains('visible') || bookmarksDropdown.classList.contains('visible');
28092811
recentDropdown.classList.remove('visible');
28102812
bookmarksDropdown.classList.remove('visible');
2813+
if (hadDropdown && !strip.matches(':hover')) scheduleHide();
28112814
}
28122815
if (!strip.contains(e.target) && !snapPopup.contains(e.target)) {
28132816
snapPopup.classList.remove('visible');
@@ -3552,6 +3555,7 @@
35523555
settingsModal.classList.remove('visible');
35533556
settingsModal.classList.add('hidden');
35543557
modalOverlay.classList.remove('visible');
3558+
if (!strip.matches(':hover')) scheduleHide();
35553559
}
35563560

35573561
settingHomeUrl.addEventListener('change', async () => {
@@ -3659,6 +3663,7 @@
36593663

36603664
function hideContextMenu() {
36613665
contextMenu.classList.remove('visible');
3666+
if (!strip.matches(':hover')) scheduleHide();
36623667
}
36633668

36643669
strip.addEventListener('contextmenu', (e) => {
@@ -3758,6 +3763,7 @@
37583763
tutorialModal.classList.remove('visible');
37593764
tutorialModal.classList.add('hidden');
37603765
modalOverlay.classList.remove('visible');
3766+
if (!strip.matches(':hover')) scheduleHide();
37613767
if (config) {
37623768
config.first_run = false;
37633769
await invoke('update_config', { config });
@@ -3901,11 +3907,15 @@
39013907
}
39023908
if (config) config.window.locked = value;
39033909
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);
39063915
applyContentOpacity(value);
39073916
if (config) config.window.opacity = value;
39083917
break;
3918+
}
39093919
case 'open_settings':
39103920
container.style.display = '';
39113921
showStrip();
@@ -3933,7 +3943,10 @@
39333943
const listen = window.__TAURI__.event.listen;
39343944

39353945
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);
39373950
applyContentOpacity(event.payload);
39383951
if (config) {
39393952
config.window.opacity = event.payload;

src-tauri/src/opacity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use tauri::{Runtime, WebviewWindow};
55
/// toolbar stays readable even when the page is nearly see-through; the
66
/// injected stylesheet applies a complementary CSS opacity to page
77
/// content so the *combined* visibility still matches the raw value.
8-
pub const WINDOW_ALPHA_FLOOR: f64 = 0.85;
8+
pub const WINDOW_ALPHA_FLOOR: f64 = 0.55;
99

1010
pub fn window_alpha_from_raw(raw: f64) -> f64 {
1111
let r = raw.clamp(0.0, 1.0);

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "FloatView",
4-
"version": "1.4.2",
4+
"version": "1.4.5",
55
"identifier": "com.floatview.desktop",
66
"build": {
77
"frontendDist": "../src",

0 commit comments

Comments
 (0)