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

(Positioner) Allow for Screen constrained positioning when using tray-icon feature #2076

Merged

Conversation

jakobwesthoff
Copy link
Contributor

positioner plugin related:

This PR implements a new trait fn on the Window called move_window_constrained, which is only available with the already existent ´tray-iconfeature. It allows to position a window based on the tray icon position, as well as the givenTray*variants from thePosition` enum, while constraining the window to the screen, where the tray icon lives. This provides a way of positioning, which ensures the window is not clipped by the borders of the screen, when being positioned relative to the tray icon.

Introducing the new method, allows the user to explicitly choose the new behavior over the old one, while maintaining BC without cluttering the Position enum with further options.

I refactored the code a little to ensure minimal duplication and to ease the maintenance in the future of both features.

Please let me know if you want anything changed with regards to general realization or coding style.

before

after

@jakobwesthoff jakobwesthoff requested a review from a team as a code owner November 19, 2024 15:16
Copy link
Contributor

Package Changes Through 7c83d8a

There are 10 changes which include upload with minor, upload-js with minor, deep-link with patch, deep-link-js with patch, log-plugin with patch, log-js with patch, fs with patch, fs-js with patch, localhost with minor, sql with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.5 2.0.6
api-example-js 2.0.2 2.0.3
deep-link-example-js 2.0.0 2.0.1
deep-link 2.0.1 2.0.2
deep-link-js 2.0.0 2.0.1
fs 2.0.3 2.0.4
fs-js 2.0.2 2.0.3
dialog 2.0.3 2.0.4
http 2.0.3 2.0.4
localhost 2.0.1 2.1.0
log-plugin 2.0.2 2.0.3
log-js 2.0.0 2.0.1
persisted-scope 2.0.3 2.0.4
single-instance 2.0.1 2.0.2
sql 2.0.2 2.0.3
upload 2.1.0 2.2.0
upload-js 2.1.0 2.2.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@amrbashir amrbashir merged commit 4db6263 into tauri-apps:v2 Nov 20, 2024
2 checks passed
@jbolda
Copy link
Member

jbolda commented Nov 20, 2024

🚀

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.

3 participants