Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make window icons follow title alignment #4497

Merged
merged 1 commit into from Sep 9, 2021

Commits on Sep 9, 2021

  1. Make window icons follow title alignment

    Fixes i3#4464.
    
    Inspired by changes from i3#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.
    orestisfl committed Sep 9, 2021
    Copy the full SHA
    cc44d9a View commit details
    Browse the repository at this point in the history