https://bugs.kde.org/show_bug.cgi?id=441827

            Bug ID: 441827
           Summary: Popup with multi-line text is sized as if it were
                    single line
           Product: frameworks-qqc2-desktop-style
           Version: 5.85.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: notm...@gmail.com
          Reporter: gm...@ratijas.tk
                CC: ahiems...@heimr.nl, k...@davidedmundson.co.uk,
                    noaha...@gmail.com
  Target Milestone: ---

Created attachment 141196
  --> https://bugs.kde.org/attachment.cgi?id=141196&action=edit
KDE QQC2 Desktop style popup is too wide

SUMMARY
Popup is wrongly sized when its text contains line breaks. I suppose it is
because under the hood a TextMetrics QML Type[1] is used to calculate width of
the popup's platform window, but TextMetrics doesn't support line breaks /
multi-line text.

[1]: https://doc.qt.io/qt-5/qml-qtquick-textmetrics.html

STEPS TO REPRODUCE
1. Hover over any item that has a hint popup with multiline text, e.g.:
2. Go to system settings -> Shortcuts -> select any group/category -> select
one with existing shortcut or create a new custom one; hover over the shortcut
input component.

OBSERVED RESULT
Two lines of hint text in a popup which is sized like if it were one line
joined with a white space instead of \n.


EXPECTED RESULT
Popup hint should be sized according to its content.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.12-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to