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

Windows: Set border for QMenu::item via stylesheet broke standard paddings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.12.2, 5.14.0 Alpha
    • 5.11.1
    • Widgets: Main Window
    • None
    • Windows 10 x64, MSVC2017x64
    • Windows
    • 0736e050cb0f82ca445e954e1db631f1dd1de473 (qt/qtbase/5.12)

    Description

      When I add stylesheet, that sets border for QMenu::item, it breaks standard paddings for this item.

      Stylesheet:

      QMenu::item {
          border: 1px solid red;
      }
      

       

      Example project: EventLoop.zip

      Result:

       

      Attachments

        1. EventLoop.zip
          13 kB
        2. expected.png
          expected.png
          5 kB
        3. image-2018-12-27-21-08-37-238.png
          image-2018-12-27-21-08-37-238.png
          19 kB
        4. image-2018-12-28-00-20-58-803.png
          image-2018-12-28-00-20-58-803.png
          20 kB
        5. image-2018-12-28-01-21-55-756.png
          image-2018-12-28-01-21-55-756.png
          10 kB
        6. image-2018-12-28-01-30-39-427.png
          image-2018-12-28-01-30-39-427.png
          11 kB
        7. image-2019-01-09-21-56-19-956.png
          image-2019-01-09-21-56-19-956.png
          22 kB
        8. image-2019-01-09-22-02-59-823.png
          image-2019-01-09-22-02-59-823.png
          22 kB
        9. image-2019-01-09-22-03-07-210.png
          image-2019-01-09-22-03-07-210.png
          22 kB
        10. image-2019-01-12-20-01-54-569.png
          image-2019-01-12-20-01-54-569.png
          10 kB
        11. image-2019-01-12-21-23-05-153.png
          image-2019-01-12-21-23-05-153.png
          9 kB
        12. image-2019-01-12-21-54-04-753.png
          image-2019-01-12-21-54-04-753.png
          15 kB
        13. menu_padding_left_right_40.png
          menu_padding_left_right_40.png
          2 kB
        14. menu-test-249408.zip
          9 kB
        15. proposed.patch
          3 kB
        16. qtbug_70491.tgz
          12 kB
        17. Result.png
          Result.png
          5 kB
        18. screenshot-1.png
          screenshot-1.png
          15 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            AndriySlisarchuk Andriy Slisarchuk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes