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

Improve search/replace dialog sizing under various locales #4098

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

techee
Copy link
Member

@techee techee commented Dec 5, 2024

Problem 1
In Czech for instance, the "In Session" button is translated as "Ve všech otevřených souborech" (meaning "in all open files"). Since the sizing of buttons is homogenous, all of them pick this size (including the "close window" checkbox on the left) and the result is a ridiculously wide search dialog that is impossible to shrink for users:

Screenshot 2024-12-05 at 19 51 16

I dropped the homogenous spacing but to simulate it, I set the minimum size of all the buttons to 130px so buttons containing shorter labels (which are most of them in practice) still have the same size. The result looks much more reasonable:

Screenshot 2024-12-05 at 20 01 51

Problem 2
In German, for instance, a translation in the first column of checkboxes is much wider than in the second column but again, the two columns are sized homogeneously so there is a lot of wasted space in the second column.

Screenshot 2024-12-05 at 19 56 50

The second patch drops the homogenous spacing so the second column can be shorter:

Screenshot 2024-12-05 at 20 02 53

Problem 3
Finally, I noticed that the vertical distance between the "Find All" expander and the "Close dialog" checkbox below it is too low and the text looks a bit crowded. I added a 6px padding there. (Check the screenshots above to see the before/after change.)

In some languages, the text in the buttons of the search-replace dialog
is quite long. For instance, in Czech the "In session" button contains
"Ve všech otevřených dokumentech" (in all open documents). Homogenous
spacing of all the buttons means that all of them have the width of
the longest string which makes the search dialog extremely wide.

This patch drops the use of the GtkButtonBox which uses homogenous
spacing and uses ordinary GtkBox instead. However, to semi-simulate
the "homogenous" appearance of buttons, the patch sets the minimum
width of the buttons to 130 so all buttons whose text fits to this
width have the same size (for most languages I tried, nearly all
strings fit this width).

Note that the buttons in the action area of the dialog are still
sized homogenously as I didn't find a way to modify this behavior.
However, this doesn't seem to be a problem in practice with the
languages I tested.
The hbox into which the 3+3 checkboxes with options are stored
is spaced homogenously right now. In some locales (German for instance)
some translation in the first column is much larger than all the
tranlsations in the second column which with the homogenous sizing
leads to a lot of wasted space in the second column and too
wide dialog.

This patch fixes that by dropping the homogenous spacing.
This patch adds 6px between them so they don't appear so close to
each other.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant