sneedmc/launcher/ui/widgets/Common.h
Lenny McLennington dab0dc451c
fix: modrinth text layout is no longer weird
Signed-off-by: Lenny McLennington <lenny@sneed.church>
2023-02-09 19:36:21 +00:00

10 lines
394 B
C

#pragma once
#include <QTextLayout>
/** Cuts out the text in textLayout into smaller pieces, according to the lineWidth.
* Returns a list of pairs, each containing the width of that line and that line's string, respectively.
* The total height of those lines is set in the last argument, 'height'.
*/
QStringList viewItemTextLayout(QTextLayout& textLayout, QSize bounds, qreal& height);