mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1219] [MERGED] fix(bar): apply position on start #1261
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1219
Author: @alex-ds13
Created: 1/7/2025
Status: ✅ Merged
Merged: 1/8/2025
Merged by: @LGUG2Z
Base:
master← Head:fix(bar)/apply-position-on-start📝 Commits (1)
45f7474fix(bar): apply position on start📊 Changes
1 file changed (+71 additions, -43 deletions)
View changed files
📝
komorebi-bar/src/bar.rs(+71 -43)📄 Description
For some reason, when calling the
window.set_positionwhen creating the Komobar or even when applying the config on the first frame the actual EGUI's window size wasn't changing. This commit adds a new field toKomobarcalledsize_rectso that we can store the expected size rect of the window according to the config, so that we don't have to be calculating it all the time. This field is updated onapply_config. Now onupdateof the bar we check if the current size using the EGUI Context is the expectedsize_rect, if it is we do nothing, if it is not we update the bar position again. This makes sure that on start the bar will resize to the users config correctly!Fixes #1213
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.