glzr-io / zebar

Zebar is a tool for creating customizable and cross-platform taskbars, desktop widgets, and popups.
GNU General Public License v3.0
1.11k stars 51 forks source link

feat: add Windows appbar implementation for reserving screen space #131

Closed fooooooooooooooo closed 3 weeks ago

fooooooooooooooo commented 1 month ago

closes #68

kinda rough but it works

lars-berger commented 1 month ago

Ay this is really well done, thanks a bunch 🙌 I've messed around a little with the appbar API's before and they were tricky to get working correctly

Will leave some comments in a sec

fooooooooooooooo commented 3 weeks ago

the code i wrote to automatically size the reserved space to the widget is a little complicated but i think it works

i added fields to the settings ui, but theres no way to unset the edge/thickness/offset values once theyve been set, as clearing the field doesnt update the file with null or anything

lars-berger commented 3 weeks ago

Sorry about taking a while to get back to this! Been constrained to a Mac the last couple weeks and finally got the Windows desktop setup last night

Thanks for the latest changes 🙌 You clearly really know your stuff when it comes to Rust - super well written

Another contributor is actually cooking up a similar feature but for wayland at #144 . Will go ahead and merge this as is, but just a heads up though there might be some small tweaks before release to fit both platforms. One thing I'm debating is removing the offset from ReserveSpaceConfig and then just reusing the offsetX + offsetY values from the widget's positioning config (and then just having a single config option for thickness/size to reserve) - does that make sense in your opinion?

fooooooooooooooo commented 3 weeks ago

im not sure if offsetting an app bar from the edge on windows even does anything, so making it just match the widget could be a good idea

i set it up in a way that you can have the reserved space be completely independent of the widgets positioning, although i dont know what that could be used for

github-actions[bot] commented 2 weeks ago

:tada: This PR is included in version 2.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: