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

QML Button (Material 3) contents truncated

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • a6532e732 (dev), 540848a4e (dev), 302124c03 (dev), 79c9ceef3 (6.7), 492385ca8 (6.7), 837f469c1 (6.7), d2f11cde6 (6.6), f6c21460a (6.6), 80f8023d2 (6.6), e219cf758 (tqtc/lts-6.5), 6bd925f6e (tqtc/lts-6.5), 02ea986d0 (tqtc/lts-6.5)

    Description

      The following button code worked fine before the Material style change (before Qt 6.5):

              Button {
                  width: 60
                  text: qsTr("CLEAR")
              } 
      

      However, when using Qt 6.6.1, "..." is displayed instead of "CLEAR" (note: using "Dense" variant).
      Setting Material.roundedScale to Material.ExtraSmallScale has no effect on the text (https://www.qt.io/blog/material-3-changes-in-qt-quick-controls).
      Changing the padding setting also seems to have no effect.

      Similarly, icons in small buttons are truncated (or disappear).  Can't you have small icon buttons anymore?

      I found one rather messy workaround, which is to use RoundButtons (which seem to work as before), but then you have to play with radius and width settings to make them equivalent.

      By the way, can you override the huge Dialog title font, or are there plans to do this (e.g. have a smaller font for the "Dense" variant)?

      For some people, Qt 6.6.1 was the first Qt 6 version functionally equivalent to Qt 5 (e.g. Qt Location) without "showstopping" bugs (e.g. QTBUG-117959), but we now also have to deal with a forced major graphic design change.
      If there are no easy equivalent workarounds to make Material migration easier for now, can the old one be put in Qt5Compat, for example?

      Attachments

        1. buttonDefault.PNG
          buttonDefault.PNG
          0.7 kB
        2. buttonPadding10.PNG
          buttonPadding10.PNG
          1 kB
        3. iconButtonDefault.PNG
          iconButtonDefault.PNG
          0.5 kB
        4. iconButtonPadding5.PNG
          iconButtonPadding5.PNG
          0.6 kB
        5. Screenshot 2023-12-12 at 16.09.29.png
          Screenshot 2023-12-12 at 16.09.29.png
          50 kB
        6. Screenshot 2023-12-12 at 16.09.46.png
          Screenshot 2023-12-12 at 16.09.46.png
          54 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mitch_curtis Mitch Curtis
            adam_price Adam Price
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: