Skip to content

FindReplace dialog layout is inconsistent and (sometimes) broken after i18n #2419

Closed
@wayoda

Description

@wayoda

My runtime environment

I run the Arduino IDE on Linux Ubuntu with the(default) javax,swing.GTK theme.

Dialog is broken in German translation

Here is a screenshot of the Find-Replace window as it appears in a German locale
*Linux GTK theme
searchandreplace-gtk
The Ignore case checkbox is unreachable because the dialog window is not wide enough and not resizable.

Looking at the code in src/processing/app/FindReplace.javareveals` an improper use of FlowLayout. The author throws all the components into a panel with the simple FlowLayoutManager and then adds some pixel-calc voodoo to break the components into lines.

In an (java-)application that runs on different platforms and which is translated into many languages this is a very bad idea. In Swing you must never mess around with window sizes or component positions/sizes. That is strictly the task of LayoutManagers.

Design is inconsistent across platforms

Here are three more versions of the Dialog as is appears on different platforms
Linux Metal Theme
searchandreplace-metal
Linux Nimbus Theme
searchandreplace-nimbus
Windows 7 Theme
searchandreplace-windows

As you can see the result is quit different :
On the Metal-Theme the buttons blend into the bottom frame and on windows the input fields are suddenly side by side,

Fix it ?

Using a more versatile Layoutmanager will fix this problem. If you need some help with this, just send me a note...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions