Remote contents warning infobar layout needs to be more space-efficient for vertical preview pane mode
On widescreen laptops that don't have super high resolutions, such as 1280x800 or 1366x768, the "remote contents" infobar's layout is problematic, particularly in languages that are move verbose than English. The main action button's label eats 30-50% of the available width, the "lightbulb" icon eats a quarter, and as a result there is only a very narrow space left for the actual warning text, which then ends up linewrapping a lot and makes the infobar two times taller than it should be, and it just looks awkward and "broken":
If you use the GTK Inspector and turn on the display of "layout boundaries" you can see the way it is structured:
Using the GTK Inspector I experimented a bit with the layout of that infobar, and was able to make it much more space-efficient while still HIG spacing compliant:
To achieve that, this is what I did inside the widget tree of that Evolution infobar, and therefore what I am proposing:
- On the left half (icon and message)
- The second GtkBox (containing the message part, on the left of the buttons and on the right of the "lightbulb" icon) should have a "spacing" property of 6 instead of 16px.
- Consider not showing the "lightbulb" icon at all (at least not when using the vertical message pane mode); it is just decoration and does not serve a truly functional purpose, yet it eats about 25% of the precious width of the infobar when using a vertical message preview pane.
- The second GtkBox's "border-width" property could also be the standard 6px instead of 8px, but I'm guessing you might have set that value on purpose to be vertically aligned with the buttons perceptually... Potential alternative, but the gains might be minor: setting the "border-width" property to 0 and use manual margin properties to better control it: margin-top = 6, margin-left = 3, margin-right = 3, margin-bottom = 6, since horizontal space is very scarce. This seemed to yield good results on my end when inside the vertical message preview, but when in a horizontal message preview you could simply have standard a standard 6px border/margins on all sides.
- On the right half (buttons):
- It seems to me that the GtkButtonBox should have a spacing of 0, not 6 pixels, because there already is spacing between buttons, at least on Adwaita. (I'm not sure why there already is spacing between the buttons, but that's been the case whether I was using the Adwaita, Elementary or HighContrast theme)