annotate src/ui_utils.cpp @ 8:b1f73678ef61

update text paragraphs are now their own objects, as they should be
author Paper <mrpapersonic@gmail.com>
date Sat, 26 Aug 2023 03:39:34 -0400
parents 07a9095eaeed
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
1 #include <QPixmap>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
2 #include <QLabel>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
3 #include <QFrame>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
4 #include <QVBoxLayout>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
5 #include <QTextBlock>
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
6 #include "window.h"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
7 #include "ui_utils.h"
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
8 #include "session.h"
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
9 #ifdef MACOSX
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
10 #include "sys/osx/dark_theme.h"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
11 #else
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
12 #include "sys/win32/dark_theme.h"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
13 #endif
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
14
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
15 namespace UiUtils {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
16
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
17 QIcon CreateSideBarIcon(const char* file) {
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
18 QPixmap pixmap(file, "PNG");
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
19 QIcon result;
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
20 result.addPixmap(pixmap, QIcon::Normal);
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
21 result.addPixmap(pixmap, QIcon::Selected);
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
22 return result;
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
23 }
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
24
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
25 bool IsInDarkMode() {
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
26 if (session.config.theme != OS)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
27 return (session.config.theme == DARK);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
28 #ifdef MACOSX
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
29 if (osx::DarkThemeAvailable()) {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
30 if (osx::IsInDarkTheme()) {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
31 return true;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
32 } else {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
33 return false;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
34 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
35 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
36 #elif defined(WIN32)
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
37 if (win32::DarkThemeAvailable()) {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
38 if (win32::IsInDarkTheme()) {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
39 return true;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
40 } else {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
41 return false;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
42 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
43 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
44 #endif
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
45 return (session.config.theme == DARK);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
46 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
47
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
48 Header::Header(QString title, QWidget* parent)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
49 : QWidget(parent) {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
50 setLayout(new QVBoxLayout);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
51 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
52
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
53 static_text_title = new QLabel(title, this);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
54 static_text_title->setTextFormat(Qt::PlainText);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
55 QFont font = static_text_title->font();
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
56 font.setWeight(QFont::Bold);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
57 static_text_title->setFont(font);
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
58 static_text_title->setFixedHeight(16);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
59
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
60 static_text_line = new QFrame(this);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
61 static_text_line->setFrameShape(QFrame::HLine);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
62 static_text_line->setFrameShadow(QFrame::Sunken);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
63 static_text_line->setFixedHeight(2);
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
64
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
65 layout()->addWidget(static_text_title);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
66 layout()->addWidget(static_text_line);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
67 layout()->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
68 layout()->setMargin(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
69 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
70
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
71 void Header::SetTitle(QString title) {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
72 static_text_title->setText(title);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
73 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
74
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
75 TextParagraph::TextParagraph(QString title, QString data, QWidget* parent)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
76 : QWidget(parent) {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
77 setLayout(new QVBoxLayout);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
78
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
79 header = new Header(title, this);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
80
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
81 QWidget* content = new QWidget(this);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
82 content->setLayout(new QHBoxLayout);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
83
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
84 paragraph = new Paragraph(data, this);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
85 paragraph->setTextInteractionFlags(Qt::NoTextInteraction);
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
86 paragraph->setAttribute(Qt::WidgetAttribute::WA_TransparentForMouseEvents);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
87 paragraph->setWordWrapMode(QTextOption::NoWrap);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
88
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
89 content->layout()->addWidget(paragraph);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
90 content->layout()->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
91 content->layout()->setMargin(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
92 content->setContentsMargins(12, 0, 0, 0);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
93
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
94 layout()->addWidget(header);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
95 layout()->addWidget(paragraph);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
96 layout()->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
97 layout()->setMargin(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
98 }
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
99
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
100 Header* TextParagraph::GetHeader() {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
101 return header;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
102 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
103
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
104 Paragraph* TextParagraph::GetParagraph() {
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
105 return paragraph;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
106 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
107
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
108 LabelledTextParagraph::LabelledTextParagraph(QString title, QString label, QString data, QWidget* parent)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
109 : QWidget(parent) {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
110 setLayout(new QVBoxLayout);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
111
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
112 header = new Header(title, this);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
113
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
114 // this is not accessible from the object because there's really
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
115 // no reason to make it accessible...
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
116 QWidget* content = new QWidget(this);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
117 content->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
118
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
119 labels = new Paragraph(label, this);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
120 labels->setTextInteractionFlags(Qt::NoTextInteraction);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
121 labels->setAttribute(Qt::WidgetAttribute::WA_TransparentForMouseEvents);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
122 labels->setWordWrapMode(QTextOption::NoWrap);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
123 labels->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
124 labels->setFixedWidth(123);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
125
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
126 paragraph = new Paragraph(data, this);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
127 paragraph->setTextInteractionFlags(Qt::NoTextInteraction);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
128 paragraph->setAttribute(Qt::WidgetAttribute::WA_TransparentForMouseEvents);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
129 paragraph->setWordWrapMode(QTextOption::NoWrap);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
130
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
131 QHBoxLayout* content_layout = new QHBoxLayout;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
132 content_layout->addWidget(labels, 0, Qt::AlignTop);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
133 content_layout->addWidget(paragraph, 0, Qt::AlignTop);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
134 content_layout->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
135 content_layout->setMargin(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
136 content->setLayout(content_layout);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
137
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
138 content->setContentsMargins(12, 0, 0, 0);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
139
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
140 layout()->addWidget(header);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
141 layout()->addWidget(content);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
142 layout()->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
143 layout()->setMargin(0);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
144 }
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
145
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
146 Header* LabelledTextParagraph::GetHeader() {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
147 return header;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
148 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
149
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
150 Paragraph* LabelledTextParagraph::GetLabels() {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
151 return labels;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
152 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
153
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
154 Paragraph* LabelledTextParagraph::GetParagraph() {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
155 return paragraph;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
156 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
157
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
158 SelectableTextParagraph::SelectableTextParagraph(QString title, QString data, QWidget* parent)
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
159 : QWidget(parent) {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
160 setLayout(new QVBoxLayout);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
161
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
162 header = new Header(title, this);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
163
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
164 QWidget* content = new QWidget(this);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
165 content->setLayout(new QHBoxLayout);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
166
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
167 paragraph = new Paragraph(data, content);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
168
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
169 content->layout()->addWidget(paragraph);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
170 content->layout()->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
171 content->layout()->setMargin(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
172 content->setContentsMargins(12, 0, 0, 0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
173
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
174 layout()->addWidget(header);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
175 layout()->addWidget(content);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
176 layout()->setSpacing(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
177 layout()->setMargin(0);
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
178 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
179
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
180 Header* SelectableTextParagraph::GetHeader() {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
181 return header;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
182 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
183
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
184 Paragraph* SelectableTextParagraph::GetParagraph() {
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
185 return paragraph;
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
186 }
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
187
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
188 void SetPlainTextEditData(QPlainTextEdit* text_edit, QString data) {
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
189 QTextDocument* document = new QTextDocument(text_edit);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
190 document->setDocumentLayout(new QPlainTextDocumentLayout(document));
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
191 document->setPlainText(data);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
192 text_edit->setDocument(document);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
193 }
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
194
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
195 /* inherits QPlainTextEdit and gives a much more reasonable minimum size */
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
196 Paragraph::Paragraph(QString text, QWidget* parent)
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
197 : QPlainTextEdit(text, parent) {
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
198 setReadOnly(true);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
199 setTextInteractionFlags(Qt::TextBrowserInteraction);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
200 setFrameShape(QFrame::NoFrame);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
201 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
202 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
203 setStyleSheet("background: transparent;");
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
204 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
205 }
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
206
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
207 /* highly based upon... some stackoverflow answer for PyQt */
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
208 QSize Paragraph::minimumSizeHint() const {
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
209 QTextDocument* doc = document();
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
210 long h = (long)(blockBoundingGeometry(doc->findBlockByNumber(doc->blockCount() - 1)).bottom() + (2 * doc->documentMargin()));
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
211 return QSize(QPlainTextEdit::sizeHint().width(), (long)h);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
212 }
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
213
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
214 QSize Paragraph::sizeHint() const {
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
215 return minimumSizeHint();
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
216 }
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
217
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
218 } // namespace UiUtils