Conversation
Package Changes Through 0e07439There are 8 changes which include tauri with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, @tauri-apps/cli with minor, tauri-cli with minor, @tauri-apps/api with minor, tauri-bundler with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
Hey, new to Tauri, been waiting for this to merge since a week. Is there a blocker for it to not be merged? Thanks. |
|
my motivation was/is the main blocker tbh. the pr didn't actually got delayed though, i always had 2.3 in mind at the earliest and PRs for that are yet to be merged (aiming for a patch release before that on the weekend). you can test this already as long as you don't create your windows in js because i didn't add those apis yet. simply add this to your Cargo.toml and run [patch.crates-io]
tauri = { git = "https://github.com/tauri-apps/tauri", branch = "traffic-lights-offset" }If you do that, please report back whether you have issues or if it works fine (will accelerate the merge :P) |
|
I tried to run it but the cli is not allowing adding |
|
Ah right, my bad. For the config option you'll also need the CLI from git (the rust Apis should work without) And then you'll use |
|
Have updated CLI: src-tauri git:(main) ✗ cargo install tauri-cli --debug --git https://github.com/tauri-apps/tauri --branch traffic-lights-offset
Updating git repository `https://github.com/tauri-apps/tauri`
Ignored package `tauri-cli v2.2.4 (https://github.com/tauri-apps/tauri?branch=traffic-lights-offset#ba941fa6)` is already installed, use --force to overrideStill getting same error. unknown field `trafficLightPosition`,
expected one of `label`, `create`, `url`, `user-agent`, `userAgent`, `drag-drop-enabled`...
found an unknown configuration field.
This usually means that you are using a CLI version that is newer than `tauri-build` and is incompatible.
Please try updating the Rust crates by running `cargo update` in the Tauri app folder.Have tried This is react + vite. |
|
Figured it out, had to also override tauri-build [patch.crates-io]
tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "traffic-lights-offset" }
tauri = { git = "https://github.com/tauri-apps/tauri", branch = "traffic-lights-offset" }It's working. Will revert after testing. |
|
No issues found, it's working correctly. |
|
coolio, thanks for testing! |
|
@FabianLars looking forward to this!! any updates on when it'll merge? |
|
🤷 |
|
Dang! Came here to implement this but you've alr done it! Good job, as always 🔥 |
|
feel free to take a look at the implementation though! not too happy with the config implementation |
|
Hmm I think it's a good starting point for now... |
|
Hey 👋, when can merge this? Also, does anyone know how to implement a similar function on Windows, thank 🙏? |
probably never
what would that entail? Never seen buttons anywhere but directly in the upper right corner on windows. If you're asking for the buttons in general (for undecorated windows) and not their positioning (which this pr is about) then this is the tracking issue i think #4531 (waiting on upstream atm) |
My demand is that I can customize the content on the right side of the macOS signal light or the left side of the Windows buttons, and the customization content is vertically aligned with the buttons. Is there any recommended solution currently? Thanks |
|
Most apps (outside of tauri land) simply render the button on Windows in their GUI itself. So in Tauri you'd disable decorations and make plain html buttons. The icons should be part of standard fonts present on every system (though I forgot its name). The only thing in Tauri you'll lose is the hover popup on the maximize button. For that I linked the issue above. Sorry that this was written so poorly, I'm on my phone and outside. |
I considered disabling the decoration, but I didn't use it because, as you said, it would cause the buttons to lose their native functionality. This plugin solved my problem, thank you for the recommendation 😸 |
|
For v3 or v4 we'll really need to revise how Positions work in the config but i think for v2 this is good enough. |
|
Yeah, LGTM. Thanks again for the awesome work Fabian! |
| /// ## Platform-specific | ||
| /// | ||
| /// - **Linux / Windows / iOS / Android:** Unsupported. | ||
| fn set_traffic_light_position(&self, position: Position) -> Result<()>; |
There was a problem hiding this comment.
This probably should be gated with #[cfg(target_os = "macos")]?
There was a problem hiding this comment.
None of the functions here are gated 🤷
There was a problem hiding this comment.
Well, gtk_window and default_vbox are (because of the dependency), anyways, just thought it's kinda weird when I updated the tauri-runtime-verso and seeing this not being gated while the other ones are, maybe we should start gating these in v3 like what we did for the other things (like set_activation_policy in Runtime and RuntimeHandle)
|
Solve: It was causing by I'm a bit stuck and can't figure out what's wrong. It seems like |
|
@FabianLars Again, thank you so much for implementing this. This option is not yet available in the |
|
it is avail in the config https://github.com/tauri-apps/tauri/pull/12366/files#diff-71422a00b887225bd5462224e0f300c1470207e43a997d3edc31317f48a14e98R427 |
|
I wanted to confirm what @Mehdi-Hp said for other people looking: the |

closes #4789