Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Notification] Position Adjustment #56

Closed
AbdelrahmanBayoumi opened this issue Jul 1, 2024 · 1 comment · Fixed by #59
Closed

[Notification] Position Adjustment #56

AbdelrahmanBayoumi opened this issue Jul 1, 2024 · 1 comment · Fixed by #59
Labels
enhancement New feature or request Notification

Comments

@AbdelrahmanBayoumi
Copy link
Owner

Description:
When setting the notification to appear at the bottom of the screen (left or right), it appears above the taskbar (Windows taskbar). Adjusting it to appear in the corner according to Screen.WorkAreaRect would be better than using the entire screen area.

Suggestion:
Modify the notification position logic to use Screen.WorkAreaRect for determining the display area to avoid overlapping with the taskbar.

// Get the bounds of the primary screen's work area (excluding the taskbar)
Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds();

// Position the notification at the bottom-right corner of the work area
notificationStage.setX(screenBounds.getMaxX() - scene.getWidth() - 10); // 10px margin from the right edge
notificationStage.setY(screenBounds.getMaxY() - scene.getHeight() - 10); // 10px margin from the bottom edge

// Show the notification
notificationStage.show();
@AbdelrahmanBayoumi
Copy link
Owner Author

image

AbdelrahmanBayoumi added a commit that referenced this issue Jul 6, 2024
chore: Update screenBounds variable to use getVisualBounds()
@AbdelrahmanBayoumi AbdelrahmanBayoumi linked a pull request Jul 6, 2024 that will close this issue
AbdelrahmanBayoumi added a commit that referenced this issue Jul 6, 2024
…on-adjustment

resolve #56 Show notification above taskbar
@AbdelrahmanBayoumi AbdelrahmanBayoumi moved this from 🚢 Todo to 🏗 Working on it in Azkar Roadmap Jul 6, 2024
@AbdelrahmanBayoumi AbdelrahmanBayoumi moved this from 🏗 Working on it to ✅ Done in Azkar Roadmap Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Notification
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant