Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129716

Submenu item not correctly aligned in rtl mode (gap to main menu)

    XMLWordPrintable

Details

    • Windows
    • 30d90b4cc (dev), 47ae9e4c2 (6.8), 87c6d142d (dev), 18b01267a (6.8), 621b44ba5 (tqtc/lts-6.5)

    Description

      A simple submenu does not align correctly when using rtl mode (`-reverse`):

      QMainWindow mw;
      auto a1 = new QAction("Action 1");
      a1->setIcon(QIcon(":/myicon.png"));
      auto a2 = new QAction("Act 2");
      a2->setCheckable(true);
      auto menu = mw.menuBar()->addMenu("Menu");
      menu->addAction(a1);
      menu->addAction(a2);
      auto submenu = menu->addMenu("Sub1");
      submenu->addAction(new QAction("Act 3"));
      mw.show();
      

      ltr mode:

      rtl mode:

      rtl mode with vista style:

      As you can see it also looks like the menu also needs to be moved some pixels to the right.
      Also the '>' arrow in ltr mode seems to be to near at the border (in rtl mode it looks better) - was a problem of my debugging while trying to figure out why there is a gap

      Attachments

        1. screenshot-3.png
          screenshot-3.png
          5 kB
        2. screenshot-2.png
          screenshot-2.png
          5 kB
        3. screenshot-1.png
          screenshot-1.png
          4 kB
        4. image-2024-10-06-19-27-26-516.png
          image-2024-10-06-19-27-26-516.png
          4 kB
        5. image-2024-10-06-19-25-32-729.png
          image-2024-10-06-19-25-32-729.png
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            chehrlic Christian Ehrlicher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes