Bug 487523

Summary: Improve legend layout
Product: [Frameworks and Libraries] frameworks-kquickcharts Reporter: popov895 <popov895>
Component: generalAssignee: Arjen Hiemstra <ahiemstra>
Status: REPORTED ---    
Severity: normal CC: ahiemstra, kdelibs-bugs-null, plasma-bugs-null, popov895
Priority: NOR    
Version First Reported In: 6.2.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Legend

Description popov895 2024-05-25 09:45:03 UTC
Created attachment 169810 [details]
Legend

SUMMARY

Currently, the legend layout doesn't use the available space very well. As you can see in the attached screenshot, the content of the legend can easily fit in 2 rows, while for some reason 4 rows are used. After a quick look at the LegendLayout code, I noticed that preferredWidth of the legend delegate is not taken into account anywhere when laying out the legend content. Perhaps that's the problem?

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed 20240523
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
KDE Gear Version: 24.02.2
Qt Version: 6.7.0