Skip to content

Conversation

@kdroidFilter
Copy link
Owner

### Summary

Refactored the visibility and positioning logic in `TrayApp` to enhance reliability and consistency, particularly on macOS and Windows. Key updates include:
- Unified visibility and position handling with improved delay management.
- Added macOS-specific delay and polling for stable dialog placement.
- Introduced `TrayAppState` for centralized state management (later removed for simplified state handling).
- Enhanced behavior for focus loss and click detection, ensuring smoother user interaction.

### Changes

- Refactored tray visibility logic and implemented a multi-step initialization process for better dialog positioning.
- Added enhancements for visibility control and window management.
- Improved inline documentation for clarity.
- Adjusted animations and state updates to align with new architecture.

- Removed `TrayAppState` dependency in favor of simplified visibility toggling with persistent composable state.
- Added `visibleOnStart` parameter for better control of initial window visibility.
- Improved handling of focus loss and outside-click behavior for smoother user experience.
- Enhanced documentation for overloads and core implementation.
… and enhance visibility and size management

- Added `TrayAppState` integration for centralized state management.
- Deprecated `windowSize` and `visibleOnStart` in favor of `TrayAppState` properties.
- Improved logic for visibility handling and window positioning.
- Refined dialog size updates and state synchronization.
- Added macOS-specific delay to resolve concurrency issue when positioning the dialog.
- Improved focus loss behavior with a startup grace period on Windows.
- Enabled front positioning for dialog window upon opening.
- Added fade animation for content wrapper.
- Added multi-step initialization process for macOS and Windows to stabilize icon position and dialog placement.
- Refined dialog state updates to ensure accurate positioning before visibility toggle.
- Enhanced inline comments for better code clarity.
- Consolidated visibility handling into a single LaunchedEffect.
- Added polling loop to ensure valid window position before showing.
- Removed redundant initialization code and streamlined state updates.
- Unified position calculation and visibility logic before showing tray window.
- Adjusted delays for better cross-platform consistency.
- Improved code readability by restructuring `try-catch` blocks.
@kdroidFilter kdroidFilter merged commit 9c71e50 into master Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants