For some reason, when calling the window.set_position when 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 to Komobar called size_rect so 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 on apply_config. Now on update of the bar we check if the current size using the EGUI Context is the expected size_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!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/1219
**Author:** [@alex-ds13](https://github.com/alex-ds13)
**Created:** 1/7/2025
**Status:** ✅ Merged
**Merged:** 1/8/2025
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `master` ← **Head:** `fix(bar)/apply-position-on-start`
---
### 📝 Commits (1)
- [`45f7474`](https://github.com/LGUG2Z/komorebi/commit/45f747487f8045112734a7acac1eb4626930f487) fix(bar): apply position on start
### 📊 Changes
**1 file changed** (+71 additions, -43 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi-bar/src/bar.rs` (+71 -43)
</details>
### 📄 Description
For some reason, when calling the `window.set_position` when 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 to `Komobar` called `size_rect` so 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 on `apply_config`. Now on `update` of the bar we check if the current size using the EGUI Context is the expected `size_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
<!--
Please follow the Conventional Commits specification.
If you need to update your PR with changes from `master`, please run `git rebase master`.
By opening this PR, you confirm that you have read and understood this project's `CONTRIBUTING.md`.
-->
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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.