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

MenuBar font assignment causes text elision on Menu titles

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Duplicate
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      If the font.family assignment is used on Windows then the Menu texts are written with elision, e. g. "Sub…". Showing width, implicitWidth, and contentWidth of the MenuBar stays the same, also the font looks the same with and without the assignment. With the assignment just the written text is truncated and elided, which is bad for a menu.

       

      import QtQuick 2.9
      import QtQuick.Controls 2.13
      import QtQuick.Layouts 1.12
      
      ApplicationWindow {
       id: root
       visible: true
       title: qsTr("Demo")
       menuBar: MenuBar {
        font.family: Qt.platform.os != "windows" ? "Liberation Sans" : Qt.application.font
        Menu
        { title: qsTr("Submenu") }
       }
      }
      

       

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              rebemlix Rolf Eike Beer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes