Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make window icons follow title alignment
Fixes #4464. Inspired by changes from #4453 but I didn't end up using the original code. For ALIGN_LEFT and ALIGN_CENTER icon offset is calculated first and then title offset is based on that. For ALIGN_RIGHT title offset is calculated first but we make sure that the icon fits in the window. Additionally, icons will now hide if there is not enough space to render them + their padding. Realistically, this won't happen in normal usecases. Effectively, icons have higher precedence over text: draw_util_text will hide text when it exceeds the max width and the code takes this into consideration. Icons will only hide when they can't fit at all, not in order to assure that the text can be displayed fully.
- Loading branch information
Showing
1 changed file
with
44 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters