[PR #1219] [MERGED] fix(bar): apply position on start #1261

Closed
opened 2026-01-05 14:54:40 +01:00 by adam · 0 comments
Owner

📋 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: masterHead: fix(bar)/apply-position-on-start


📝 Commits (1)

  • 45f7474 fix(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_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


🔄 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>
adam added the pull-request label 2026-01-05 14:54:40 +01:00
adam closed this issue 2026-01-05 14:54:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1261