#342 Placement of [OK] and [Cancel] buttons is unconsistant

GUI (97)

The relative location of [OK] and [Cancel] buttons in various windows is not consistant.
In some, [Ok] is on the right of [Cancel], in other, it is the opposite.

Modify -> Attributes, [OK] is on the left of [Cancel]
Block -> Remove Block, [[Cancel] is on the left of [OK]

This can lead to unwanted actions.
I would like the relative location of these buttons being always the same.




  • Dongxu Li

    Dongxu Li - 2012-08-29


    can you help creating a list of places where consistency is preferred?

    any help is welcome?


  • Rallaz

    Rallaz - 2012-08-29

    Hi Jean-Luc,
    tested in winXP 32bits and openSUSE 12.1 64bits in both dialogs OK is in the left and Cancel in the right.

    May be, you are using gnome?
    Please, add more info, architecture, system, desktop, etc.

  • Jean-Luc Coulon

    Jean-Luc Coulon - 2012-08-29


    Yes, I use gnome but it is not related to gnome. gnome is the desktop environnment and I've tested with other ones: xfce and kde with the same result.

    My configuration:
    Debian GNU/Linux. With kernel 3.5.1.
    Architecture x86_64.



  • Dongxu Li

    Dongxu Li - 2012-08-31
    • status: open --> open-accepted
  • Rallaz

    Rallaz - 2012-09-09

    "Modify -> Attributes" are a dialog written for LibreCAD and
    "Block -> Remove Block" are a QMessageBox from Qt:
    and say:
    "The display order for the buttons is platform-dependent. For example, on Windows, Save is displayed to the left of Cancel, whereas on Mac OS, the order is reversed."

    The solution are non trivial:
    1. The easy way:
    Change LC code to ensure OK button are in the left or

    2. The correct and strong way:
    Identify the correct sequence of buttons according to platform and modify all dialogs accordingly

  • Rallaz

    Rallaz - 2012-09-10

    Hi Jean-Luc,
    I need your help to solve this issue.

    The buttons in a QMessageBox are a QDialogButtonBox
    and button layout in a QDialogButtonBox are controlled by:
    ButtonLayout { WinLayout, MacLayout, KdeLayout, GnomeLayout }

    then the good solution is remove the buttons in LC dialogs and change
    for QDialogButtonBox.
    So if a system usually has the cancel button on the left all the dialogues of Librecad also.

    Added a first commit to solve #aef0f8bfca
    But I can't test because in my systems allways [OK] is on the left.

    To test draw an arc then select "Modify->Properties" selecting the arc.
    [Cancel] is on the left ? like "Block -> Remove Block" with last commit applied, of course

  • Jean-Luc Coulon

    Jean-Luc Coulon - 2012-09-10

    Hi Rallaz,

    Yes, I get the [Cancel] button on the left.
    ScreenShot attached.


  • Rallaz

    Rallaz - 2012-09-11

    Patched 27 dialogs, commits
    aef0f8bfca, 28b2586303 & 9721b82ecb

    I dont think none is missing but...

  • Rallaz

    Rallaz - 2012-09-11
    • status: open-accepted --> open-fixed
  • Rallaz

    Rallaz - 2012-11-23

    fixed a month ago without more comment. Closing

  • Rallaz

    Rallaz - 2012-11-23
    • assigned_to: nobody --> rallaz
    • status: open-fixed --> closed-fixed

Log in to post a comment.