This commit makes the workspaces on Komorebi widget optional. This way it allows adding the workspaces on one Alignment and the focused_window on another one, for example.
For some reason if you had some widget on the center_widgets with only icons, like the focused_window with just icons or the workspaces with just icons and nothing else, EGUI wouldn't show the icon properly. I believe that on the first frame the icons might not have been loaded yet, so it set the height of the center_widgets Area to 0 and afterwards it wouldn't grow to fit the icons unless we've made some config change for example.
To fix this we've made the icons have fixed size which is equal to the font size. For this it was required that the font size was added to the RenderConfig so that the widgets would have access to it when rendering.
This fix was done by @CtByte on PR #1184 as well with the scaling of icons, so this PR was rebased to that one to make use of said fix. This PR should only be merged after #1184 is merged to avoid conflicts.
🔄 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/1177
**Author:** [@alex-ds13](https://github.com/alex-ds13)
**Created:** 12/14/2024
**Status:** ✅ Merged
**Merged:** 12/17/2024
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `master` ← **Head:** `fix(bar)/optional-workspaces`
---
### 📝 Commits (1)
- [`53c74a2`](https://github.com/LGUG2Z/komorebi/commit/53c74a28edd7a72bd94303f038c881fddb13f048) feat(bar): optional workspaces on Komorebi widget
### 📊 Changes
**3 files changed** (+142 additions, -147 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi-bar/src/bar.rs` (+29 -32)
📝 `komorebi-bar/src/komorebi.rs` (+106 -99)
📝 `komorebi-bar/src/widget.rs` (+7 -16)
</details>
### 📄 Description
This commit makes the `workspaces` on `Komorebi` widget optional. This way it allows adding the `workspaces` on one Alignment and the `focused_window` on another one, for example.
~~For some reason if you had some widget on the `center_widgets` with only icons, like the `focused_window` with just icons or the `workspaces` with just icons and nothing else, EGUI wouldn't show the icon properly. I believe that on the first frame the icons might not have been loaded yet, so it set the height of the `center_widgets` Area to 0 and afterwards it wouldn't grow to fit the icons unless we've made some config change for example.~~
~~To fix this we've made the icons have fixed size which is equal to the font size. For this it was required that the font size was added to the `RenderConfig` so that the widgets would have access to it when rendering.~~
This fix was done by @CtByte on PR #1184 as well with the scaling of icons, so this PR was rebased to that one to make use of said fix. This PR should only be merged after #1184 is merged to avoid conflicts.
<!--
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/1177
Author: @alex-ds13
Created: 12/14/2024
Status: ✅ Merged
Merged: 12/17/2024
Merged by: @LGUG2Z
Base:
master← Head:fix(bar)/optional-workspaces📝 Commits (1)
53c74a2feat(bar): optional workspaces on Komorebi widget📊 Changes
3 files changed (+142 additions, -147 deletions)
View changed files
📝
komorebi-bar/src/bar.rs(+29 -32)📝
komorebi-bar/src/komorebi.rs(+106 -99)📝
komorebi-bar/src/widget.rs(+7 -16)📄 Description
This commit makes the
workspacesonKomorebiwidget optional. This way it allows adding theworkspaceson one Alignment and thefocused_windowon another one, for example.For some reason if you had some widget on thecenter_widgetswith only icons, like thefocused_windowwith just icons or theworkspaceswith just icons and nothing else, EGUI wouldn't show the icon properly. I believe that on the first frame the icons might not have been loaded yet, so it set the height of thecenter_widgetsArea to 0 and afterwards it wouldn't grow to fit the icons unless we've made some config change for example.To fix this we've made the icons have fixed size which is equal to the font size. For this it was required that the font size was added to theRenderConfigso that the widgets would have access to it when rendering.This fix was done by @CtByte on PR #1184 as well with the scaling of icons, so this PR was rebased to that one to make use of said fix. This PR should only be merged after #1184 is merged to avoid conflicts.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.