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

Update the zoom dropdown width calculation to work better in locales with long zoom-strings (PR 11077 follow-up) #12250

Merged

Commits on Aug 20, 2020

  1. Update the zoom dropdown width calculation to work better in locales …

    …with long zoom-strings (PR 11077 follow-up)
    
    With the changes in PR 11077, the zoom dropdown now looks "squashed" in locales with longer than average zoom-strings[1]. The reason is that the zoom-value and the dropdown-icon are too close together, which doesn't look good in affected locales.
    
    To fix this, the following changes are made:
     - Increase the calculated dropdown width, in `Toolbar._adjustScaleWidth`, to account for the much wider icon (7 px -> 16 px) and the increased padding.
     - Move the dropdown-icon *slightly* outwards, and also *slightly* reduce the left (right in RTL locales) padding of the dropdown-contents.
     - Finally, remove the right (left in RTL locales) padding to reduce the chance of the *default* browser dropdown-icon being visible.
    
    ---
    [1] This affects e.g. the `de` and `nl` locales, but there's probably other examples as well.
    Snuffleupagus committed Aug 20, 2020
    Configuration menu
    Copy the full SHA
    2683f44 View commit details
    Browse the repository at this point in the history